Sha256: 36a51b829c239bd921a88e8b4fba040755a6f710b81123ae3dbc434c406a5a13
Contents?: true
Size: 980 Bytes
Versions: 18
Compression:
Stored size: 980 Bytes
Contents
require 'spec_helper' describe 'g5_authenticatable:purge_users' do include_context 'rake' context 'when there are no local users' do it 'should not raise any errors' do expect { task.invoke }.to_not raise_error end it 'should not leave any user data in the db' do task.invoke expect(G5Authenticatable::User.count).to eq(0) end end context 'when there is one local user' do let!(:user) { FactoryGirl.create(:g5_authenticatable_user) } it 'should delete the user data from the db' do expect { task.invoke }.to change { G5Authenticatable::User.count }.from(1).to(0) end end context 'when there are multiple local users' do let!(:user1) { FactoryGirl.create(:g5_authenticatable_user) } let!(:user2) { FactoryGirl.create(:g5_authenticatable_user) } it 'should delete the user data from the db' do expect { task.invoke }.to change { G5Authenticatable::User.count }.from(2).to(0) end end end
Version data entries
18 entries across 18 versions & 1 rubygems