Fix current rubocop violations

This commit is contained in:
Maikel Linke
2019-06-14 11:40:09 +10:00
parent 2b593a59f5
commit ac79e44d9a
3 changed files with 8 additions and 4 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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
{