mirror of
https://github.com/discourse/discourse-solved.git
synced 2025-02-16 16:45:02 +00:00
DEV: Use cloneJSON
in tests (#195)
This commit is contained in:
parent
9ef62060c4
commit
830062a9e6
@ -2,6 +2,7 @@ import { acceptance, queryAll } from "discourse/tests/helpers/qunit-helpers";
|
|||||||
import { fixturesByUrl } from "discourse/tests/helpers/create-pretender";
|
import { fixturesByUrl } from "discourse/tests/helpers/create-pretender";
|
||||||
import { test } from "qunit";
|
import { test } from "qunit";
|
||||||
import { click, fillIn, visit } from "@ember/test-helpers";
|
import { click, fillIn, visit } from "@ember/test-helpers";
|
||||||
|
import { cloneJSON } from "discourse-common/lib/object";
|
||||||
|
|
||||||
acceptance("Discourse Solved Plugin", function (needs) {
|
acceptance("Discourse Solved Plugin", function (needs) {
|
||||||
needs.user();
|
needs.user();
|
||||||
@ -228,7 +229,7 @@ acceptance("Discourse Solved Plugin", function (needs) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
server.get("/search", () => {
|
server.get("/search", () => {
|
||||||
const fixtures = Object.assign({}, fixturesByUrl["/search.json"]);
|
const fixtures = cloneJSON(fixturesByUrl["/search.json"]);
|
||||||
fixtures.topics[0].has_accepted_answer = true;
|
fixtures.topics[0].has_accepted_answer = true;
|
||||||
return helper.response(fixtures);
|
return helper.response(fixtures);
|
||||||
});
|
});
|
||||||
|
Loading…
x
Reference in New Issue
Block a user