Skip to content

Commit

Permalink
Test that fee can be updated from weight to Flat Rate
Browse files Browse the repository at this point in the history
 + Missing some spree i18n keys
  • Loading branch information
jibees committed Mar 10, 2022
1 parent 29f2058 commit e8212b5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4187,6 +4187,8 @@ See the %{link} to find out more about %{sitename}'s features and to start using
spree/payment:
one: Payment
other: Payments
unit: unit
per_unit: per unit
datetime:
distance_in_words:
about_x_hours:
Expand Down
8 changes: 8 additions & 0 deletions spec/system/admin/enterprise_fees_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,15 @@
expect(fee.inherits_tax_category).to eq(true)
end

it "handle when updating calculator type for Weight to Flat Rate" do
select 'Weight (per kg or lb)', from: 'sets_enterprise_fee_set_collection_attributes_0_calculator_type'
click_button 'Update'

select 'Flat Rate (per item)', from: 'sets_enterprise_fee_set_collection_attributes_0_calculator_type'
click_button 'Update'

expect(fee.reload.calculator_type).to eq("Calculator::PerItem")
end
end

it "deleting an enterprise fee" do
Expand Down

0 comments on commit e8212b5

Please sign in to comment.