-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FIX: anon access, git workflow branch (#88)
* COMPATIBILITY: update for Ember 5, add FE tests * FIX: tests! * IMPROVE: add github workflow * linting * add Gemfiles * add rubocop config * linting * rename rubocop config * FIX: prevent error when logged out * complete merge * switch workflow to master * linting
- Loading branch information
Showing
4 changed files
with
61 additions
and
29 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ name: Discourse Plugin | |
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
pull_request: | ||
|
||
jobs: | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import { visit } from "@ember/test-helpers"; | ||
import { test } from "qunit"; | ||
import { acceptance, exists } from "discourse/tests/helpers/qunit-helpers"; | ||
import { default as RetortTopics } from "../fixtures/retort-topic-fixtures"; | ||
|
||
acceptance("Retort - Anon", function (needs) { | ||
needs.settings({ | ||
retort_enabled: true, | ||
}); | ||
|
||
needs.pretender((server, helper) => { | ||
const topicPath = "/t/56.json"; | ||
server.get(topicPath, () => helper.response(RetortTopics[topicPath])); | ||
}); | ||
|
||
test("It does not show retort controls", async (assert) => { | ||
await visit("/t/slug/56"); | ||
|
||
assert.notOk(exists("button.retort"), "retort controls are not available"); | ||
}); | ||
}); |