mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix current rubocop violations
This commit is contained in:
@@ -14,7 +14,9 @@ feature 'Caching' do
|
||||
it "displays results when things are good" do
|
||||
# Given matching data
|
||||
Rails.cache.write "products-json-#{distributor.id}-#{order_cycle.id}", "[1, 2, 3]\n"
|
||||
allow(OpenFoodNetwork::ProductsRenderer).to receive(:new) { double(:pr, products_json: "[1, 2, 3]\n") }
|
||||
allow(OpenFoodNetwork::ProductsRenderer).to receive(:new) {
|
||||
double(:pr, products_json: "[1, 2, 3]\n")
|
||||
}
|
||||
|
||||
# When I visit the cache status page
|
||||
visit spree.admin_path
|
||||
@@ -28,7 +30,9 @@ feature 'Caching' do
|
||||
it "displays results when there are errors" do
|
||||
# Given matching data
|
||||
Rails.cache.write "products-json-#{distributor.id}-#{order_cycle.id}", "[1, 2, 3]\n"
|
||||
allow(OpenFoodNetwork::ProductsRenderer).to receive(:new) { double(:pr, products_json: "[1, 3]\n") }
|
||||
allow(OpenFoodNetwork::ProductsRenderer).to receive(:new) {
|
||||
double(:pr, products_json: "[1, 3]\n")
|
||||
}
|
||||
|
||||
# When I visit the cache status page
|
||||
visit spree.admin_path
|
||||
|
||||
@@ -27,7 +27,7 @@ feature '
|
||||
expect(page).to have_relationship e1, e2, ['to add to order cycle']
|
||||
expect(page).to have_relationship e2, e3, ['to manage products']
|
||||
expect(page).to have_relationship e3, e4,
|
||||
['to add to order cycle', 'to manage products']
|
||||
['to add to order cycle', 'to manage products']
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ module Spree
|
||||
describe "setting default credit card for a user" do
|
||||
let(:user) { create(:user) }
|
||||
let(:onetime_card_attrs) do
|
||||
{user: user, gateway_payment_profile_id: "tok_1EY..."}
|
||||
{ user: user, gateway_payment_profile_id: "tok_1EY..." }
|
||||
end
|
||||
let(:stored_card_attrs) do
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user