mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Remove I18n keys in support specs
This commit is contained in:
@@ -17,7 +17,7 @@ shared_examples "a model using the LocalizedNumber module" do |attributes|
|
||||
it "creates an error if the input to #{attribute} is invalid" do
|
||||
subject.send(setter, '1.59,99')
|
||||
subject.valid?
|
||||
expect(subject.errors[attribute]).to include(I18n.t('spree.localized_number.invalid_format'))
|
||||
expect(subject.errors[attribute]).to include('has an invalid format. Please enter a number.')
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -11,7 +11,7 @@ RSpec::Matchers.define :validate_date_time_format_of do |attribute|
|
||||
match do |instance|
|
||||
@instance, @attribute = instance, attribute
|
||||
|
||||
invalid_format_message = I18n.t("validators.date_time_string_validator.invalid_format_error")
|
||||
invalid_format_message = 'must be valid'
|
||||
|
||||
allow(instance).to receive(attribute) { "Invalid Format" }
|
||||
instance.valid?
|
||||
|
||||
@@ -11,7 +11,7 @@ RSpec::Matchers.define :validate_integer_array do |attribute|
|
||||
match do |instance|
|
||||
@instance, @attribute = instance, attribute
|
||||
|
||||
invalid_format_message = I18n.t("validators.integer_array_validator.invalid_element_error")
|
||||
invalid_format_message = 'must contain only valid integers'
|
||||
|
||||
allow(instance).to receive(attribute) { [1, "2", "Not Integer", 3] }
|
||||
instance.valid?
|
||||
|
||||
@@ -20,7 +20,7 @@ module ShopWorkflow
|
||||
wait_for_cart
|
||||
toggle_cart
|
||||
within '.cart-sidebar' do
|
||||
expect(page).to have_link I18n.t('shared.menu.cart_sidebar.edit_cart')
|
||||
expect(page).to have_link 'Edit cart'
|
||||
end
|
||||
first("a.edit-cart").click
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user