mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 22:43:33 +08:00
DEV: Ember linting - disallow Ember.* variable usage (#8782)
This commit is contained in:

committed by
GitHub

parent
88779d849f
commit
499b57a9ed
@ -5,6 +5,7 @@ import {
|
||||
NO_CATEGORIES_ID,
|
||||
ALL_CATEGORIES_ID
|
||||
} from "select-kit/components/category-drop";
|
||||
import { set } from "@ember/object";
|
||||
|
||||
testSelectKitModule("category-drop");
|
||||
|
||||
@ -82,8 +83,8 @@ componentTest("[not staff - TL0] displayCategoryDescription", {
|
||||
template: template(),
|
||||
|
||||
beforeEach() {
|
||||
Ember.set(this.currentUser, "staff", false);
|
||||
Ember.set(this.currentUser, "trustLevel", 0);
|
||||
set(this.currentUser, "staff", false);
|
||||
set(this.currentUser, "trustLevel", 0);
|
||||
|
||||
initCategories(this);
|
||||
},
|
||||
@ -103,8 +104,8 @@ componentTest("[not staff - TL1] displayCategoryDescription", {
|
||||
template: template(),
|
||||
|
||||
beforeEach() {
|
||||
Ember.set(this.currentUser, "staff", false);
|
||||
Ember.set(this.currentUser, "trustLevel", 1);
|
||||
set(this.currentUser, "staff", false);
|
||||
set(this.currentUser, "trustLevel", 1);
|
||||
|
||||
initCategories(this);
|
||||
},
|
||||
@ -124,8 +125,8 @@ componentTest("[staff - TL0] displayCategoryDescription", {
|
||||
template: template(),
|
||||
|
||||
beforeEach() {
|
||||
Ember.set(this.currentUser, "staff", true);
|
||||
Ember.set(this.currentUser, "trustLevel", 0);
|
||||
set(this.currentUser, "staff", true);
|
||||
set(this.currentUser, "trustLevel", 0);
|
||||
|
||||
initCategories(this);
|
||||
},
|
||||
|
@ -1,11 +1,12 @@
|
||||
import componentTest from "helpers/component-test";
|
||||
import { testSelectKitModule } from "./select-kit-test-helper";
|
||||
import Site from "discourse/models/site";
|
||||
import { set } from "@ember/object";
|
||||
|
||||
testSelectKitModule("tag-drop", {
|
||||
beforeEach() {
|
||||
const site = Site.current();
|
||||
Ember.set(site, "top_tags", ["jeff", "neil", "arpit", "régis"]);
|
||||
set(site, "top_tags", ["jeff", "neil", "arpit", "régis"]);
|
||||
|
||||
const response = object => {
|
||||
return [200, { "Content-Type": "application/json" }, object];
|
||||
|
Reference in New Issue
Block a user