Permalink
Browse files

Remove effective_tax_rate method that was not being used

Closes #1419
  • Loading branch information...
1 parent 645bbc2 commit dbc296ebc5267618ca4f8b8f39ab0b126c1434a7 @radar radar committed May 24, 2012
Showing with 0 additions and 25 deletions.
  1. +0 −8 core/app/models/spree/product.rb
  2. +0 −17 core/spec/models/product_spec.rb
@@ -184,14 +184,6 @@ def categorise_variants_from_option(opt_type)
variants.active.group_by { |v| v.option_values.detect { |o| o.option_type == opt_type} }
end
- def effective_tax_rate
- if tax_category
- tax_category.effective_amount
- else
- TaxRate.default
- end
- end
-
def self.like_any(fields, values)
where_str = fields.map { |field| Array.new(values.size, "#{self.quoted_table_name}.#{field} #{LIKE} ?").join(' OR ') }.join(' OR ')
self.where([where_str, values.map { |value| "%#{value}%" } * fields.size].flatten)
@@ -294,23 +294,6 @@
end
end
- context '#effective_tax_rate' do
- let(:product) { stub_model(Spree::Product) }
-
- it 'should check tax category for applicable rates' do
- tax_category = double("Tax Category")
- product.stub :tax_category => tax_category
- tax_category.should_receive(:effective_amount)
- product.effective_tax_rate
- end
-
- it 'should return default tax rate when no tax category is defined' do
- product.stub :tax_category => nil
- product.effective_tax_rate.should == Spree::TaxRate.default
- end
-
- end
-
context "#images" do
let(:product) { create(:product) }

0 comments on commit dbc296e

Please sign in to comment.