mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-26 01:33:22 +00:00
Style RSpec/NotToNot
This commit is contained in:
@@ -93,7 +93,7 @@ describe "Enterprises", type: :request, swagger_doc: "dfc.yaml", rswag_autodoc:
|
||||
let(:other_enterprise) { create(:distributor_enterprise) }
|
||||
|
||||
run_test! do
|
||||
expect(response.body).to_not include "Apple"
|
||||
expect(response.body).not_to include "Apple"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -26,7 +26,7 @@ describe "Persons", type: :request, swagger_doc: "dfc.yaml", rswag_autodoc: true
|
||||
let(:id) { other_user.id }
|
||||
|
||||
run_test! do
|
||||
expect(response.body).to_not include "dfc-b:Person"
|
||||
expect(response.body).not_to include "dfc-b:Person"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -74,9 +74,9 @@ module OrderManagement
|
||||
payment_authorize.call!
|
||||
|
||||
expect(order.errors.size).to eq 0
|
||||
expect(PaymentMailer).to_not have_received(:authorize_payment)
|
||||
expect(PaymentMailer).to_not have_received(:authorization_required)
|
||||
expect(mail_mock).to_not have_received(:deliver_now)
|
||||
expect(PaymentMailer).not_to have_received(:authorize_payment)
|
||||
expect(PaymentMailer).not_to have_received(:authorization_required)
|
||||
expect(mail_mock).not_to have_received(:deliver_now)
|
||||
end
|
||||
|
||||
context "when the processing is off-session (via backoffice/subscription)" do
|
||||
|
||||
@@ -237,7 +237,7 @@ module OrderManagement
|
||||
|
||||
it "returns paid" do
|
||||
updater.update_payment_state
|
||||
expect(order.payment_state).to_not eq("requires_authorization")
|
||||
expect(order.payment_state).not_to eq("requires_authorization")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -362,7 +362,7 @@ module OrderManagement
|
||||
|
||||
it "cancels unused payments requiring authorization" do
|
||||
expect(stripe_payment).to receive(:void_transaction!)
|
||||
expect(cash_payment).to_not receive(:void_transaction!)
|
||||
expect(cash_payment).not_to receive(:void_transaction!)
|
||||
|
||||
order.updater.update_payment_state
|
||||
end
|
||||
@@ -416,7 +416,7 @@ module OrderManagement
|
||||
it "doesn't touch taxes" do
|
||||
allow(order).to receive(:completed?) { false }
|
||||
|
||||
expect(order).to_not receive(:create_tax_charge!)
|
||||
expect(order).not_to receive(:create_tax_charge!)
|
||||
updater.__send__(:handle_legacy_taxes)
|
||||
end
|
||||
end
|
||||
@@ -439,7 +439,7 @@ module OrderManagement
|
||||
|
||||
context "and the order has no legacy taxes" do
|
||||
it "leaves taxes untouched" do
|
||||
expect(order).to_not receive(:create_tax_charge!)
|
||||
expect(order).not_to receive(:create_tax_charge!)
|
||||
|
||||
updater.__send__(:handle_legacy_taxes)
|
||||
end
|
||||
|
||||
@@ -168,7 +168,7 @@ module OrderManagement
|
||||
end
|
||||
|
||||
it "does not return soft-deleted shipping methods" do
|
||||
expect(package.shipping_methods).to_not include shipping_method3
|
||||
expect(package.shipping_methods).not_to include shipping_method3
|
||||
end
|
||||
|
||||
it "returns an empty array if distributor is nil" do
|
||||
|
||||
@@ -42,7 +42,7 @@ module OrderManagement
|
||||
before { allow(order).to receive(:new_outstanding_balance) { 10 } }
|
||||
|
||||
it "does nothing" do
|
||||
expect{ payment_setup.call! }.to_not change { payment.amount }.from(10)
|
||||
expect{ payment_setup.call! }.not_to change { payment.amount }.from(10)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -10,8 +10,8 @@ module OrderManagement
|
||||
|
||||
it "raises an error when initialized with an object
|
||||
that is not a Subscription or an ActiveRecord::Relation" do
|
||||
expect{ ProxyOrderSyncer.new(subscription) }.to_not raise_error
|
||||
expect{ ProxyOrderSyncer.new(Subscription.where(id: subscription.id)) }.to_not raise_error
|
||||
expect{ ProxyOrderSyncer.new(subscription) }.not_to raise_error
|
||||
expect{ ProxyOrderSyncer.new(Subscription.where(id: subscription.id)) }.not_to raise_error
|
||||
expect{ ProxyOrderSyncer.new("something") }.to raise_error RuntimeError
|
||||
end
|
||||
end
|
||||
@@ -70,8 +70,8 @@ module OrderManagement
|
||||
let!(:oc) { closed_oc }
|
||||
|
||||
it "does not create a new proxy order for that oc" do
|
||||
expect{ subscription.save! }.to_not change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).to_not include oc
|
||||
expect{ subscription.save! }.not_to change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).not_to include oc
|
||||
end
|
||||
end
|
||||
|
||||
@@ -79,8 +79,8 @@ module OrderManagement
|
||||
let!(:oc) { open_oc_closes_before_begins_at_oc }
|
||||
|
||||
it "does not create a new proxy order for that oc" do
|
||||
expect{ subscription.save! }.to_not change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).to_not include oc
|
||||
expect{ subscription.save! }.not_to change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).not_to include oc
|
||||
end
|
||||
end
|
||||
|
||||
@@ -99,8 +99,8 @@ module OrderManagement
|
||||
let!(:oc) { upcoming_closes_before_begins_at_oc }
|
||||
|
||||
it "does not create a new proxy order for that oc" do
|
||||
expect{ subscription.save! }.to_not change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).to_not include oc
|
||||
expect{ subscription.save! }.not_to change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).not_to include oc
|
||||
end
|
||||
end
|
||||
|
||||
@@ -130,8 +130,8 @@ module OrderManagement
|
||||
let!(:oc) { upcoming_closes_after_ends_at_oc }
|
||||
|
||||
it "does not create a new proxy order for that oc" do
|
||||
expect{ subscription.save! }.to_not change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).to_not include oc
|
||||
expect{ subscription.save! }.not_to change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).not_to include oc
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -149,7 +149,7 @@ module OrderManagement
|
||||
context "the oc is closed (ie. closed before opens_at)" do
|
||||
let(:oc) { closed_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -157,7 +157,7 @@ module OrderManagement
|
||||
context "and the schedule includes an open oc that closes before begins_at" do
|
||||
let(:oc) { open_oc_closes_before_begins_at_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -165,7 +165,7 @@ module OrderManagement
|
||||
context "and the oc is open and closes between begins_at and ends_at" do
|
||||
let(:oc) { open_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -173,7 +173,7 @@ module OrderManagement
|
||||
context "and the oc is upcoming and closes before begins_at" do
|
||||
let(:oc) { upcoming_closes_before_begins_at_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -181,7 +181,7 @@ module OrderManagement
|
||||
context "and the oc is upcoming and closes on begins_at" do
|
||||
let(:oc) { upcoming_closes_on_begins_at_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -189,7 +189,7 @@ module OrderManagement
|
||||
context "and the oc is upcoming and closes on ends_at" do
|
||||
let(:oc) { upcoming_closes_on_ends_at_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -197,7 +197,7 @@ module OrderManagement
|
||||
context "and the oc is upcoming and closes after ends_at" do
|
||||
let(:oc) { upcoming_closes_after_ends_at_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -209,7 +209,7 @@ module OrderManagement
|
||||
|
||||
it "removes the proxy order" do
|
||||
expect{ syncer.sync! }.to change { ProxyOrder.count }.from(1).to(0)
|
||||
expect(proxy_orders).to_not include proxy_order
|
||||
expect(proxy_orders).not_to include proxy_order
|
||||
end
|
||||
end
|
||||
|
||||
@@ -218,7 +218,7 @@ module OrderManagement
|
||||
|
||||
it "removes the proxy order" do
|
||||
expect{ syncer.sync! }.to change { ProxyOrder.count }.from(1).to(0)
|
||||
expect(proxy_orders).to_not include proxy_order
|
||||
expect(proxy_orders).not_to include proxy_order
|
||||
end
|
||||
end
|
||||
|
||||
@@ -238,7 +238,7 @@ module OrderManagement
|
||||
let(:oc) { open_oc }
|
||||
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -247,7 +247,7 @@ module OrderManagement
|
||||
let(:oc) { upcoming_closes_on_begins_at_oc }
|
||||
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -256,7 +256,7 @@ module OrderManagement
|
||||
let(:oc) { upcoming_closes_on_ends_at_oc }
|
||||
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -267,7 +267,7 @@ module OrderManagement
|
||||
|
||||
it "removes the proxy order" do
|
||||
expect{ syncer.sync! }.to change { ProxyOrder.count }.from(1).to(0)
|
||||
expect(proxy_orders).to_not include proxy_order
|
||||
expect(proxy_orders).not_to include proxy_order
|
||||
end
|
||||
end
|
||||
|
||||
@@ -276,7 +276,7 @@ module OrderManagement
|
||||
|
||||
it "removes the proxy order" do
|
||||
expect{ syncer.sync! }.to change { ProxyOrder.count }.from(1).to(0)
|
||||
expect(proxy_orders).to_not include proxy_order
|
||||
expect(proxy_orders).not_to include proxy_order
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -297,7 +297,7 @@ module OrderManagement
|
||||
context "the oc is closed (ie. closed before opens_at)" do
|
||||
let(:oc) { closed_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -305,7 +305,7 @@ module OrderManagement
|
||||
context "and the schedule includes an open oc that closes before begins_at" do
|
||||
let(:oc) { open_oc_closes_before_begins_at_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -313,7 +313,7 @@ module OrderManagement
|
||||
context "and the oc is open and closes between begins_at and ends_at" do
|
||||
let(:oc) { open_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -321,7 +321,7 @@ module OrderManagement
|
||||
context "and the oc is upcoming and closes before begins_at" do
|
||||
let(:oc) { upcoming_closes_before_begins_at_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -329,7 +329,7 @@ module OrderManagement
|
||||
context "and the oc is upcoming and closes on begins_at" do
|
||||
let(:oc) { upcoming_closes_on_begins_at_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -337,7 +337,7 @@ module OrderManagement
|
||||
context "and the oc is upcoming and closes on ends_at" do
|
||||
let(:oc) { upcoming_closes_on_ends_at_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -345,7 +345,7 @@ module OrderManagement
|
||||
context "and the oc is upcoming and closes after ends_at" do
|
||||
let(:oc) { upcoming_closes_after_ends_at_oc }
|
||||
it "keeps the proxy order" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(1)
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(1)
|
||||
expect(proxy_orders).to include proxy_order
|
||||
end
|
||||
end
|
||||
@@ -357,7 +357,7 @@ module OrderManagement
|
||||
let(:oc) { closed_oc }
|
||||
it "removes the proxy order" do
|
||||
expect{ syncer.sync! }.to change { ProxyOrder.count }.from(1).to(0)
|
||||
expect(proxy_orders).to_not include proxy_order
|
||||
expect(proxy_orders).not_to include proxy_order
|
||||
end
|
||||
end
|
||||
|
||||
@@ -366,7 +366,7 @@ module OrderManagement
|
||||
let(:oc) { open_oc }
|
||||
it "removes the proxy order" do
|
||||
expect{ syncer.sync! }.to change { ProxyOrder.count }.from(1).to(0)
|
||||
expect(proxy_orders).to_not include proxy_order
|
||||
expect(proxy_orders).not_to include proxy_order
|
||||
end
|
||||
end
|
||||
|
||||
@@ -374,7 +374,7 @@ module OrderManagement
|
||||
let(:oc) { upcoming_closes_before_begins_at_oc }
|
||||
it "removes the proxy order" do
|
||||
expect{ syncer.sync! }.to change { ProxyOrder.count }.from(1).to(0)
|
||||
expect(proxy_orders).to_not include proxy_order
|
||||
expect(proxy_orders).not_to include proxy_order
|
||||
end
|
||||
end
|
||||
|
||||
@@ -382,7 +382,7 @@ module OrderManagement
|
||||
let(:oc) { upcoming_closes_on_begins_at_oc }
|
||||
it "removes the proxy order" do
|
||||
expect{ syncer.sync! }.to change { ProxyOrder.count }.from(1).to(0)
|
||||
expect(proxy_orders).to_not include proxy_order
|
||||
expect(proxy_orders).not_to include proxy_order
|
||||
end
|
||||
end
|
||||
|
||||
@@ -390,7 +390,7 @@ module OrderManagement
|
||||
let(:oc) { upcoming_closes_on_ends_at_oc }
|
||||
it "removes the proxy order" do
|
||||
expect{ syncer.sync! }.to change { ProxyOrder.count }.from(1).to(0)
|
||||
expect(proxy_orders).to_not include proxy_order
|
||||
expect(proxy_orders).not_to include proxy_order
|
||||
end
|
||||
end
|
||||
|
||||
@@ -398,7 +398,7 @@ module OrderManagement
|
||||
let(:oc) { upcoming_closes_after_ends_at_oc }
|
||||
it "removes the proxy order" do
|
||||
expect{ syncer.sync! }.to change { ProxyOrder.count }.from(1).to(0)
|
||||
expect(proxy_orders).to_not include proxy_order
|
||||
expect(proxy_orders).not_to include proxy_order
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -421,8 +421,8 @@ module OrderManagement
|
||||
let!(:oc) { closed_oc }
|
||||
|
||||
it "does not create a new proxy order for that oc" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).to_not include oc
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).not_to include oc
|
||||
end
|
||||
end
|
||||
|
||||
@@ -430,8 +430,8 @@ module OrderManagement
|
||||
let(:oc) { open_oc_closes_before_begins_at_oc }
|
||||
|
||||
it "does not create a new proxy order for that oc" do
|
||||
expect{ subscription.save! }.to_not change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).to_not include oc
|
||||
expect{ subscription.save! }.not_to change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).not_to include oc
|
||||
end
|
||||
end
|
||||
|
||||
@@ -448,8 +448,8 @@ module OrderManagement
|
||||
let!(:oc) { upcoming_closes_before_begins_at_oc }
|
||||
|
||||
it "does not create a new proxy order for that oc" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).to_not include oc
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).not_to include oc
|
||||
end
|
||||
end
|
||||
|
||||
@@ -475,8 +475,8 @@ module OrderManagement
|
||||
let!(:oc) { upcoming_closes_after_ends_at_oc }
|
||||
|
||||
it "does not create a new proxy order for that oc" do
|
||||
expect{ syncer.sync! }.to_not change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).to_not include oc
|
||||
expect{ syncer.sync! }.not_to change { ProxyOrder.count }.from(0)
|
||||
expect(order_cycles).not_to include oc
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -28,7 +28,7 @@ module OrderManagement
|
||||
let(:payment_method) { create(:payment_method) }
|
||||
|
||||
it "returns the pending payment with no change" do
|
||||
expect(payment).to_not receive(:update)
|
||||
expect(payment).not_to receive(:update)
|
||||
expect(payment_setup.call!).to eq payment
|
||||
end
|
||||
end
|
||||
@@ -38,7 +38,7 @@ module OrderManagement
|
||||
|
||||
context "and the card is already set (the payment source is a credit card)" do
|
||||
it "returns the pending payment with no change" do
|
||||
expect(payment).to_not receive(:update)
|
||||
expect(payment).not_to receive(:update)
|
||||
expect(payment_setup.call!).to eq payment
|
||||
end
|
||||
end
|
||||
@@ -54,7 +54,7 @@ module OrderManagement
|
||||
it "adds an error to the order and does not update the payment" do
|
||||
payment_setup.call!
|
||||
|
||||
expect(payment).to_not receive(:update)
|
||||
expect(payment).not_to receive(:update)
|
||||
expect(payment_setup.call!).to eq payment
|
||||
expect(order.errors[:base].first).to eq "There are no authorised " \
|
||||
"credit cards available to charge"
|
||||
@@ -80,7 +80,7 @@ module OrderManagement
|
||||
it "adds an error to the order and does not update the payment" do
|
||||
payment_setup.call!
|
||||
|
||||
expect(payment).to_not receive(:update)
|
||||
expect(payment).not_to receive(:update)
|
||||
expect(payment_setup.call!).to eq payment
|
||||
expect(order.errors[:base].first).to eq "There are no authorised " \
|
||||
"credit cards available to charge"
|
||||
|
||||
@@ -121,7 +121,7 @@ module OrderManagement
|
||||
|
||||
it "returns orders specified by unrecorded_ids" do
|
||||
expect(orders).to include order1
|
||||
expect(orders).to_not include order2
|
||||
expect(orders).not_to include order2
|
||||
end
|
||||
end
|
||||
|
||||
@@ -130,7 +130,7 @@ module OrderManagement
|
||||
|
||||
it "returns orders specified by the relevant issue hash" do
|
||||
expect(orders).to include order2
|
||||
expect(orders).to_not include order1
|
||||
expect(orders).not_to include order1
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -74,7 +74,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:shipping_method]).to_not be_empty
|
||||
expect(validator.errors[:shipping_method]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -89,7 +89,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:shipping_method]).to_not be_empty
|
||||
expect(validator.errors[:shipping_method]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -115,7 +115,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:payment_method]).to_not be_empty
|
||||
expect(validator.errors[:payment_method]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -130,7 +130,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:payment_method]).to_not be_empty
|
||||
expect(validator.errors[:payment_method]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -164,7 +164,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:payment_method]).to_not be_empty
|
||||
expect(validator.errors[:payment_method]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -192,7 +192,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:begins_at]).to_not be_empty
|
||||
expect(validator.errors[:begins_at]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -213,7 +213,7 @@ module OrderManagement
|
||||
let(:ends_at) { Time.zone.today }
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:ends_at]).to_not be_empty
|
||||
expect(validator.errors[:ends_at]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -221,7 +221,7 @@ module OrderManagement
|
||||
let(:ends_at) { Time.zone.today - 1.day }
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:ends_at]).to_not be_empty
|
||||
expect(validator.errors[:ends_at]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -249,8 +249,8 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:bill_address]).to_not be_empty
|
||||
expect(validator.errors[:ship_address]).to_not be_empty
|
||||
expect(validator.errors[:bill_address]).not_to be_empty
|
||||
expect(validator.errors[:ship_address]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -276,7 +276,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:customer]).to_not be_empty
|
||||
expect(validator.errors[:customer]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -288,7 +288,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:customer]).to_not be_empty
|
||||
expect(validator.errors[:customer]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -313,7 +313,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:schedule]).to_not be_empty
|
||||
expect(validator.errors[:schedule]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -325,7 +325,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:schedule]).to_not be_empty
|
||||
expect(validator.errors[:schedule]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -371,7 +371,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:payment_method]).to_not be_empty
|
||||
expect(validator.errors[:payment_method]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -383,7 +383,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:payment_method]).to_not be_empty
|
||||
expect(validator.errors[:payment_method]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -395,7 +395,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:payment_method]).to_not be_empty
|
||||
expect(validator.errors[:payment_method]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -428,7 +428,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:subscription_line_items]).to_not be_empty
|
||||
expect(validator.errors[:subscription_line_items]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -441,7 +441,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:subscription_line_items]).to_not be_empty
|
||||
expect(validator.errors[:subscription_line_items]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -468,7 +468,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:subscription_line_items]).to_not be_empty
|
||||
expect(validator.errors[:subscription_line_items]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
@@ -480,7 +480,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:subscription_line_items]).to_not be_empty
|
||||
expect(validator.errors[:subscription_line_items]).not_to be_empty
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -538,7 +538,7 @@ module OrderManagement
|
||||
|
||||
it "adds an error and returns false" do
|
||||
expect(validator.valid?).to be false
|
||||
expect(validator.errors[:subscription_line_items]).to_not be_empty
|
||||
expect(validator.errors[:subscription_line_items]).not_to be_empty
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ module OrderManagement
|
||||
}
|
||||
|
||||
it "is not eligible" do
|
||||
expect(described_class.eligible_variants(shop)).to_not include(variant)
|
||||
expect(described_class.eligible_variants(shop)).not_to include(variant)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -106,7 +106,7 @@ module OrderManagement
|
||||
|
||||
context "if the variant is unrelated" do
|
||||
it "is not eligible" do
|
||||
expect(described_class.eligible_variants(shop)).to_not include(variant)
|
||||
expect(described_class.eligible_variants(shop)).not_to include(variant)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -154,7 +154,7 @@ module OrderManagement
|
||||
|
||||
context "if the variant is unrelated" do
|
||||
it "is false" do
|
||||
expect(described_class).to_not be_in_open_and_upcoming_order_cycles(shop,
|
||||
expect(described_class).not_to be_in_open_and_upcoming_order_cycles(shop,
|
||||
schedule,
|
||||
variant)
|
||||
end
|
||||
|
||||
@@ -24,13 +24,13 @@ module Web
|
||||
end
|
||||
|
||||
scenario "is not equal to the matomo URL" do
|
||||
expect(helper.matomo_iframe_src).to_not eq Spree::Config.matomo_url
|
||||
expect(helper.matomo_iframe_src).not_to eq Spree::Config.matomo_url
|
||||
end
|
||||
end
|
||||
|
||||
scenario "is not nil, when matomo url is nil" do
|
||||
Spree::Config.matomo_url = nil
|
||||
expect(helper.matomo_iframe_src).to_not eq nil
|
||||
expect(helper.matomo_iframe_src).not_to eq nil
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -652,11 +652,11 @@ describe '
|
||||
invoice_content = extract_pdf_content
|
||||
|
||||
expect(invoice_content).to have_content("TAX INVOICE", count: 1)
|
||||
expect(invoice_content).to_not have_content(order4.number.to_s)
|
||||
expect(invoice_content).not_to have_content(order4.number.to_s)
|
||||
expect(invoice_content).to have_content(order5.number.to_s)
|
||||
expect(invoice_content).to_not have_content(distributor4.name.to_s)
|
||||
expect(invoice_content).not_to have_content(distributor4.name.to_s)
|
||||
expect(invoice_content).to have_content(distributor5.name.to_s)
|
||||
expect(invoice_content).to_not have_content(order_cycle4.name.to_s)
|
||||
expect(invoice_content).not_to have_content(order_cycle4.name.to_s)
|
||||
expect(invoice_content).to have_content(order_cycle5.name.to_s)
|
||||
end
|
||||
end
|
||||
@@ -728,11 +728,11 @@ describe '
|
||||
within ".ofn-drop-down .menu" do
|
||||
expect {
|
||||
page.find("span", text: "Print Invoices").click # Prints invoices in bulk
|
||||
}.to_not enqueue_job(BulkInvoiceJob)
|
||||
}.not_to enqueue_job(BulkInvoiceJob)
|
||||
end
|
||||
|
||||
expect(page).to_not have_content "Compiling Invoices"
|
||||
expect(page).to_not have_content "Please wait until the PDF is ready " \
|
||||
expect(page).not_to have_content "Compiling Invoices"
|
||||
expect(page).not_to have_content "Please wait until the PDF is ready " \
|
||||
"before closing this modal."
|
||||
|
||||
expect(page).to have_content "#{
|
||||
|
||||
Reference in New Issue
Block a user