Skip to content

Commit

Permalink
Merge branch 'develop' into y24-285-filter-single-vs-dual-index-adapt…
Browse files Browse the repository at this point in the history
…er-types
  • Loading branch information
seenanair committed Feb 12, 2025
2 parents dd4e4cb + bf13288 commit cf8bb5a
Show file tree
Hide file tree
Showing 2 changed files with 380 additions and 65 deletions.
23 changes: 23 additions & 0 deletions spec/models/well_attribute_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,27 @@
)
expect(Warren.handler.messages_matching("queue_broadcast.messenger.#{warehouse_message.id}")).to be 2
end

describe '#estimated_volume' do
it 'returns the estimated volume as a float' do
well_attribute.current_volume = 10
expect(well_attribute.estimated_volume).to be_a(Float)
end

it 'returns the estimated volume as the measured volume if both are set' do
well_attribute.current_volume = 10
well_attribute.measured_volume = 20
expect(well_attribute.estimated_volume).to eq 20.0
end

it 'returns the current volume if the measured volume is not set' do
well_attribute.current_volume = 10
expect(well_attribute.estimated_volume).to eq 10.0
end

it 'returns the measured volume if the current volume is not set' do
well_attribute.measured_volume = 20
expect(well_attribute.estimated_volume).to eq 20.0
end
end
end
Loading

0 comments on commit cf8bb5a

Please sign in to comment.