How to test controllers with nested routes using rspec

前端 未结 1 757
北恋
北恋 2021-02-19 00:41

I create controller with InherritedResource

class AppsController < InheritedResources::Base
  belongs_to :company

  # Devise
  before_filter :login_or_oauth_         


        
相关标签:
1条回答
  • 2021-02-19 01:42

    I found solution :-P

    What I did was just to change from

    get :index
    

    to

    get :index, :company_id => @company_1.id
    
    0 讨论(0)
提交回复
热议问题