Skip to content

Commit

Permalink
remove not used method
Browse files Browse the repository at this point in the history
  • Loading branch information
lovrocolic committed Dec 11, 2024
1 parent 95cc7e1 commit cf883f0
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 20 deletions.
6 changes: 0 additions & 6 deletions app/models/charge.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,12 +61,6 @@ def supports_grouped_by?
standard? || dynamic?
end

def basic_rate_percentage?
return false unless percentage?

properties.keys == ['rate']
end

def equal_properties?(charge)
charge_model == charge.charge_model && properties == charge.properties
end
Expand Down
14 changes: 0 additions & 14 deletions spec/models/charge_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -546,20 +546,6 @@
end
end

describe '#basic_rate_percentage?' do
it 'returns false if charge model is not percentage' do
expect(build(:standard_charge)).not_to be_basic_rate_percentage
end

it 'returns false if charge model is percentage but has other properties except rate' do
expect(build(:charge, charge_model: 'percentage', properties: {fixed_amount: '20'})).not_to be_basic_rate_percentage
end

it 'returns true only if properties of percentage charge contain only rate' do
expect(build(:charge, charge_model: 'percentage', properties: {rate: '0.20'})).to be_basic_rate_percentage
end
end

describe '#equal_properties?' do
let(:charge1) { build(:standard_charge, properties: {amount: 100}) }

Expand Down

0 comments on commit cf883f0

Please sign in to comment.