spec/lib/shamu/rails/controller_spec.rb in shamu-0.0.9 vs spec/lib/shamu/rails/controller_spec.rb in shamu-0.0.11
- old
+ new
@@ -16,11 +16,11 @@
service :secure_service, ControllerSpec::SecureService
public :services, :secure_services, :permit?
def show
- render text: ""
+ render plain: ""
end
end
describe ".service" do
it "makes the service available" do
@@ -45,14 +45,14 @@
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( :show ) do
expect( scorpion.fetch( Shamu::Security::Principal ).user_id ).to eq 945
- controller.render( text: "" )
+ controller.render( plain: "" )
end
- get :show, id: 5
+ get :show, params: { id: 5 }
end
end
describe ".services" do
it "includes all the service names" do
@@ -69,6 +69,6 @@
it "is false if none of the secure_services permit the requested behavior" do
expect( controller.send( :secure_service ) ).to receive( :permit? ).and_return false
expect( controller ).not_to be_permitted_to :read, :something
end
end
-end
\ No newline at end of file
+end