mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix spec checking if VINE api is set up
The condition for checking the error now match a real scenario
This commit is contained in:
@@ -113,8 +113,9 @@ RSpec.describe "Admin ConnectedApp" do
|
||||
|
||||
context "when VINE API is not set up properly" do
|
||||
before do
|
||||
# VineApiService will raise a KeyError if VINE_API_URL is not set
|
||||
allow(VineApiService).to receive(:new).and_raise(KeyError)
|
||||
allow(ENV).to receive(:fetch).and_call_original
|
||||
allow(ENV).to receive(:fetch).with("VINE_API_URL").and_raise(KeyError)
|
||||
allow(VineApiService).to receive(:new).and_call_original
|
||||
end
|
||||
|
||||
it "redirects to enterprise edit page, with an error" do
|
||||
|
||||
Reference in New Issue
Block a user