Commit a63fcabf authored by Serena Fang's avatar Serena Fang

Change activate to unban

parent 3b0f3cdc
...@@ -1919,15 +1919,15 @@ RSpec.describe User do ...@@ -1919,15 +1919,15 @@ RSpec.describe User do
user.ban! user.ban!
end end
it 'activates the user' do it 'unbans the user' do
user.activate user.unban
expect(user.banned?).to eq(false) expect(user.banned?).to eq(false)
expect(user.active?).to eq(true) expect(user.active?).to eq(true)
end end
it 'deletes the BannedUser record' do it 'deletes the BannedUser record' do
expect { user.activate }.to change { Users::BannedUser.count }.by(-1) expect { user.unban }.to change { Users::BannedUser.count }.by(-1)
expect(Users::BannedUser.where(user_id: user.id)).not_to exist expect(Users::BannedUser.where(user_id: user.id)).not_to exist
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment