spec/castronaut/adapters/restful_authentication/user_spec.rb in relevance-castronaut-0.6.1 vs spec/castronaut/adapters/restful_authentication/user_spec.rb in relevance-castronaut-0.7.4
- old
+ new
@@ -73,21 +73,21 @@
describe "when the user is not found" do
it "returns a Castronaut::AuthenticationResult object with the unable to authenticate user message" do
Castronaut::Adapters::RestfulAuthentication::User.stub!(:find_by_login).and_return(nil)
- Castronaut::Adapters::RestfulAuthentication::User.authenticate('bob', '1234').error_message.should == "Unable to authenticate the username bob"
+ Castronaut::Adapters::RestfulAuthentication::User.authenticate('bob', '1234').error_message.should == "Unable to authenticate"
end
end
describe "when the user is found" do
describe "when the credentials are invalid" do
it "returns a Castronaut::AuthenticationResult object with the unable to authenticate user message" do
- Castronaut::Adapters::RestfulAuthentication::User.stub!(:find_by_login).and_return(stub_everything(:crypted_password => "a", :salt => "b"))
- Castronaut::Adapters::RestfulAuthentication::User.authenticate('bob', '1234').error_message.should == "Unable to authenticate the username bob"
+ Castronaut::Adapters::RestfulAuthentication::User.stub!(:find_by_login).and_return(stub(:crypted_password => "a", :salt => "b").as_null_object)
+ Castronaut::Adapters::RestfulAuthentication::User.authenticate('bob', '1234').error_message.should == "Unable to authenticate"
end
end
describe "when the credentials are valid" do