Skip to content

Commit

Permalink
fix: tests
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolasleger committed Feb 13, 2022
1 parent 4fa37ea commit d00e872
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/test_openfoodfacts.rb
Expand Up @@ -201,14 +201,14 @@ def test_it_fetches_products_for_language
def test_it_fetches_product_states
VCR.use_cassette("product_states") do
product_states = ::Openfoodfacts::ProductState.all
assert_equal "https://world.openfoodfacts.org/state/front-photo-not-selected", product_states.last.url
assert_includes product_states.map { |product_state| product_state['url'] }, "https://world.openfoodfacts.org/state/to-be-completed"
end
end

def test_it_fetches_product_states_for_locale
VCR.use_cassette("product_states_locale") do
product_states = ::Openfoodfacts::ProductState.all(locale: 'fr')
assert_equal "https://fr.openfoodfacts.org/etat/en:front-photo-not-selected", product_states.last.url
assert_includes product_states.map { |product_state| product_state['url'] }, "https://fr.openfoodfacts.org/etat/a-completer"
end
end

Expand Down

0 comments on commit d00e872

Please sign in to comment.