spec/lita/handlers/locker_spec.rb in lita-locker-0.5.1 vs spec/lita/handlers/locker_spec.rb in lita-locker-0.5.2

- old
+ new

@@ -56,15 +56,15 @@ :locker_admins ).and_return(true) end let(:alice) do - Lita::User.create('9001@hipchat', name: 'Alice', mention_name: '@alice') + Lita::User.create('9001@hipchat', name: 'Alice', mention_name: 'alice') end let(:bob) do - Lita::User.create('9002@hipchat', name: 'Bob', mention_name: '@bob') + Lita::User.create('9002@hipchat', name: 'Bob', mention_name: 'bob') end describe '#lock' do it 'locks a label when it is available and has resources' do send_command('locker resource create foobar') @@ -99,11 +99,11 @@ send_command('locker resource create foobar') send_command('locker label create bazbat') send_command('locker label add foobar to bazbat') send_command('lock bazbat', as: alice) send_command('lock bazbat', as: bob) - expect(replies.last).to eq('(failed) bazbat is locked by Alice @alice') + expect(replies.last).to eq('(failed) bazbat is locked by Alice (@alice)') end it 'shows an error when a label does not exist' do send_command('lock foobar') expect(replies.last).to eq('(failed) Label foobar does not exist. To ' \ @@ -139,10 +139,10 @@ send_command('locker resource create foobar') send_command('locker label create bazbat') send_command('locker label add foobar to bazbat') send_command('lock bazbat', as: alice) send_command('unlock bazbat', as: bob) - expect(replies.last).to eq('(failed) bazbat is locked by Alice @alice') + expect(replies.last).to eq('(failed) bazbat is locked by Alice (@alice)') end it 'shows a warning when a label is already unlocked' do send_command('locker resource create foobar') send_command('locker label create bazbat')