spec/lib/shamu/rails/controller_spec.rb in shamu-0.0.19 vs spec/lib/shamu/rails/controller_spec.rb in shamu-0.0.20
- old
+ new
@@ -41,10 +41,10 @@
expect( controller.secure_services ).not_to include kind_of( ControllerSpec::Service )
expect( controller.secure_services ).to include kind_of( ControllerSpec::SecureService )
end
it "gets security context from current_user" do
- expect( controller ).to receive( :current_user ).at_least( :once ).and_return( OpenStruct.new( id: 945 ) )
+ expect( controller ).to receive( :current_user_id ).at_least( :once ).and_return( 945 )
expect( controller ).to receive( :show ) do
expect( scorpion.fetch( Shamu::Security::Principal ).user_id ).to eq 945
controller.render( plain: "" )
end