Skip to content

Commit

Permalink
Fix spec checking if VINE api is set up
Browse files Browse the repository at this point in the history
The condition for checking the error now match a real scenario
  • Loading branch information
rioug committed Oct 8, 2024
1 parent df67b53 commit 08308ba
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions spec/requests/admin/connected_apps_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,9 @@

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
Expand Down

0 comments on commit 08308ba

Please sign in to comment.