Skip to content

Commit

Permalink
Fix the timestamp collision possibility
Browse files Browse the repository at this point in the history
  • Loading branch information
fiveNinePlusR committed Sep 14, 2024
1 parent 78079b0 commit 763905c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions spec/requests/api/v1/locations_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -829,15 +829,15 @@
end

it 'respects no_details and shows fewer location fields' do
lmx = FactoryBot.create(:location_machine_xref, location: @location, machine: FactoryBot.create(:machine, id: 777, name: 'Cleo'))
lmx = FactoryBot.create(:location_machine_xref, location: @location, machine: FactoryBot.create(:machine, id: 7777, name: 'Cleo'))
FactoryBot.create(:machine_condition, location_machine_xref_id: lmx.id, comment: 'foo bar')
FactoryBot.create(:machine_score_xref, location_machine_xref: lmx, score: 567)
FactoryBot.create(:machine_score_xref, location_machine_xref: lmx, score: 567890)
get "/api/v1/locations/#{@location.id}.json", params: { no_details: 1 }

expect(response.body).to include('Satchmo')
expect(response.body).to include('777')
expect(response.body).to include('7777')
expect(response.body).to_not include('foo bar')
expect(response.body).to_not include('567')
expect(response.body).to_not include('567890')
end
end

Expand Down

0 comments on commit 763905c

Please sign in to comment.