Files
nairobi/spec/models/poll/officer_assignment_spec.rb
Bertocq ed16a78f42 Enables RSpec/ExampleWording and fixes all issues
Both avoiding 'should' and repiting 'it' on the tests description
improves reading them and also makes all descriptions consistent.

Read about cop at http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/ExampleWording
2018-01-07 01:03:45 +01:00

13 lines
374 B
Ruby

require 'rails_helper'
describe Poll::OfficerAssignment do
it "logs user data on creation" do
user = create(:user, username: "Larry Bird", email: "larry@lege.nd")
officer = create(:poll_officer, user: user)
oa = create(:poll_officer_assignment, officer: officer)
expect(oa.reload.user_data_log).to eq "#{user.id} - Larry Bird (larry@lege.nd)"
end
end