使用“ ...”选项注册页面时,链接不起作用

时间:2018-11-21 21:09:05

标签: ruby-on-rails activeadmin

我有一个名为“事件”的页面,我想以其他方式调用它,所以我使用port 21 Yes, and SCTP Assigned Official File Transfer Protocol (FTP) control (command) port 22 Yes, and SCTP Assigned Official Secure Shell (SSH), secure logins, file transfers (scp, sftp) and port forwarding 覆盖了它

as: '...'

但是现在特定事件页面上的链接不起作用。

ActiveAdmin.register Event, as: "MySite" do
...
end

我得到的错误是sidebar "Additional options", only: [:show] do ul do li link_to "Download CSV ", generate_csv_admin_event_path(resource, format: :csv) end end

我该如何解决?

1 个答案:

答案 0 :(得分:1)

fit('should add a question',()=>{
    let backendService = TestBed.get(WebToBackendInterfaceService);
    let questionService = TestBed.get(QuestionManagementService);
    let question = new PracticeQuestion(...);

    const responseData = { result: 'success', ['additional-info']: 'question added successfully' };
    let httpResponseEvent:HttpResponse<any> = new HttpResponse<any>({body:responseData});
    //mock response of WebToBackendInterfaceService
    spyOn(backendService,'createQuestion').and.returnValue(new Observable(()=>{
      httpResponseEvent;
    }));

    questionService.addQuestion$.subscribe((res:Result)=>{
      console.log('received response from Question Services',res);
      expect(res).toBeTruthy();
      let validResponse:boolean = ((res.result === 'success') || (res.result === 'initial')) ;
      expect(validResponse).toEqual(true);
    });
    questionService.addQuestion(question);
    expect(backendService.createQuestion).toHaveBeenCalled();
  });