-
Notifications
You must be signed in to change notification settings - Fork 57
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: user api key for webcal generation
- Loading branch information
1 parent
682edd2
commit 7f0de09
Showing
5 changed files
with
38 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
spec/requests/discourse_events/api_keys_controller_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# frozen_string_literal: true | ||
|
||
describe DiscourseEvents::ApiKeysController do | ||
fab!(:user) { Fabricate(:user, admin: true) } | ||
|
||
before { sign_in(user) } | ||
|
||
it "returns an api key" do | ||
get "/discourse-events/api-keys.json" | ||
expect(response.status).to eq(200) | ||
expect(response.parsed_body["api_keys"].first["key"]).to be_present | ||
expect(response.parsed_body["api_keys"].first["client_id"]).to be_present | ||
end | ||
end |