spec/controllers/application_controller_spec.rb in marty-2.5.2 vs spec/controllers/application_controller_spec.rb in marty-2.5.4
- old
+ new
@@ -6,11 +6,11 @@
subject.logout_user
expect(Marty::User.current).to be_nil
end
describe 'authentication' do
- it "should allow a registered user to log in" do
+ it 'should allow a registered user to log in' do
allow(Rails.configuration.marty).to receive(:auth_source).
and_return('local')
user = Marty::User.try_to_login('marty', 'marty')
subject.set_user(user)
@@ -18,12 +18,12 @@
subject.logout_user
expect(Marty::User.current).to be_nil
end
- it "should allow a registered user to log in when the database " +
- "is in recovery mode" do
+ it 'should allow a registered user to log in when the database ' +
+ 'is in recovery mode' do
allow(Marty::Util).to receive(:db_in_recovery?).and_return(true)
allow(Rails.configuration.marty).to receive(:auth_source).
and_return('local')
user = Marty::User.try_to_login('marty', 'marty')
@@ -32,17 +32,17 @@
subject.logout_user
expect(Marty::User.current).to be_nil
end
- it "should prevent a non-registered user from logging in" do
+ it 'should prevent a non-registered user from logging in' do
user = Marty::User.try_to_login('unknown_marty', 'invalid_password')
expect(user).to be_nil
expect(Marty::User.current).to be_nil
end
- it "should prevent a non-registered user from logging in when the " +
- "database is in recovery mode" do
+ it 'should prevent a non-registered user from logging in when the ' +
+ 'database is in recovery mode' do
allow(Marty::Util).to receive(:db_in_recovery?).and_return(true)
user = Marty::User.try_to_login('unknown_marty', 'invalid_password')
expect(user).to be_nil
expect(Marty::User.current).to be_nil
end