Skip to content

Commit

Permalink
fix a test
Browse files Browse the repository at this point in the history
  • Loading branch information
msimonborg committed Jul 2, 2017
1 parent aa658fa commit a10671a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/models/office_location_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@
expect(office.longitude).to_not be(nil)
end

it 'calls #set_city_state_and_zip before_save only if it\'s rep is not a CongressionalRep' do
it 'calls #set_city_state_and_zip before_save only if it\'s rep is a StateRep' do
rep = StateRep.create(state: State.new, chamber: 'lower')
office = OfficeLocation.new address: '123 Main St., Anytown, NY 10000', rep: rep
office.save
Expand All @@ -211,10 +211,10 @@
office = OfficeLocation.new address: '123 Main St., Anytown, NY 10000', rep: rep
office.save

expect(office.address).to eq('123 Main St.')
expect(office.city).to eq('Anytown')
expect(office.state).to eq('NY')
expect(office.zip).to eq('10000')
expect(office.address).to_not eq('123 Main St.')
expect(office.city).to_not eq('Anytown')
expect(office.state).to_not eq('NY')
expect(office.zip).to_not eq('10000')

rep = CongressionalRep.create(state: State.new, chamber: 'lower')
office = OfficeLocation.new address: "123 Main St.\nAnytown\nNY 10000-1234", rep: rep
Expand Down

0 comments on commit a10671a

Please sign in to comment.