makes rubocop happy

This commit is contained in:
Eugene Dubinin 2017-01-23 17:23:37 +02:00
parent b86c03f898
commit 22e0c1d8f8
4 changed files with 7 additions and 12 deletions

View file

@ -77,9 +77,7 @@ describe Admin::EventsController do
it 'does not create new event' do
allow_any_instance_of(Event).to receive(:save).and_return(false)
expect do
post :create, event: attributes_for(:event, event_type_id: event_type.id),
conference_id: conference.short_title,
user: attributes_for(:user)
post :create, event: attributes_for(:event, event_type_id: event_type.id), conference_id: conference.short_title, user: attributes_for(:user)
end.not_to change{ Event.count }
end
end

View file

@ -114,12 +114,12 @@ describe Event do
it 'when submitter is is provided but the user does not exist' do
@new_event.submitter_id = 'deadbeef'
expect(@new_event).to be_invalid
expect(@new_event.errors[:submitter_id]).to eq ["user should exist!"]
expect(@new_event.errors[:submitter_id]).to eq ['user should exist!']
end
it 'when speaker id is provided but the user does not exist' do
@new_event.speaker_id = 'deadbeef'
expect(@new_event).to be_invalid
expect(@new_event.errors[:speaker_id]).to eq ["user should exist!"]
expect(@new_event.errors[:speaker_id]).to eq ['user should exist!']
end
end
context 'is valid with owner validation enabled' do