mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-11 03:40:20 +00:00
Load all shops that a user is associated with as a customer
Regardless of the presence of an order
This commit is contained in:
@@ -23,6 +23,18 @@ module Api
|
||||
expect(json_response.length).to eq 1
|
||||
expect(json_response.first[:id]).to eq customer1.id
|
||||
end
|
||||
|
||||
context "when the accounts distributor id has been set" do
|
||||
before do
|
||||
Spree::Config.set(accounts_distributor_id: customer1.enterprise.id)
|
||||
end
|
||||
|
||||
it "ignores the customer for that enterprise (if it exists)" do
|
||||
spree_get :index
|
||||
expect(response.status).to eq 200
|
||||
expect(json_response.length).to eq 0
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "#update" do
|
||||
|
||||
Reference in New Issue
Block a user