mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
REFACTOR: Fixes poor class hierarchy for listing topics
- Upgrades Ember to latest - Fixes a bunch of bugs with page titles and missing "active" states
This commit is contained in:
1
test/javascripts/fixtures/current_user.js
Normal file
1
test/javascripts/fixtures/current_user.js
Normal file
@@ -0,0 +1 @@
|
||||
PreloadStore.store("currentUser", {"id":42,"username":"eviltrout","avatar_template":"//www.gravatar.com/avatar/c6e17f2ae2a215e87ff9e878a4e63cd9.png?s={size}&r=pg&d=identicon","name":"Evil Trout","unread_notifications":0,"unread_private_messages":0,"admin":false,"notification_channel_position":null,"site_flagged_posts_count":0,"moderator":false,"staff":false,"reply_count":0,"topic_count":0,"enable_quoting":true,"external_links_in_new_tab":false,"dynamic_favicon":false,"trust_level":0,"can_edit":true});
|
||||
4
test/javascripts/fixtures/discovery_fixtures.js
Normal file
4
test/javascripts/fixtures/discovery_fixtures.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,4 +1,4 @@
|
||||
integration("List Topics");
|
||||
integration("Discover Topics");
|
||||
|
||||
test("Default List", function() {
|
||||
expect(2);
|
||||
@@ -16,14 +16,14 @@ test("isInternal with a HTTPS url", function() {
|
||||
});
|
||||
|
||||
test("navigatedToHome", function() {
|
||||
var fakeListController = { refresh: function() { return true; } };
|
||||
var fakeListController = { send: function() { return true; } };
|
||||
var mock = sinon.mock(fakeListController);
|
||||
this.stub(Discourse.URL, "controllerFor").returns(fakeListController);
|
||||
|
||||
mock.expects("refresh").twice();
|
||||
mock.expects("send").withArgs('refresh').twice();
|
||||
ok(Discourse.URL.navigatedToHome("/", "/"));
|
||||
|
||||
var defaultFilter = "/" + Discourse.ListController.FILTERS[0];
|
||||
var defaultFilter = "/" + Discourse.Site.currentProp('filters')[0];
|
||||
ok(Discourse.URL.navigatedToHome(defaultFilter, "/"));
|
||||
|
||||
ok(!Discourse.URL.navigatedToHome("/old", "/new"));
|
||||
|
||||
@@ -78,6 +78,7 @@ Discourse.rootElement = '#ember-testing';
|
||||
Discourse.setupForTesting();
|
||||
Discourse.injectTestHelpers();
|
||||
Discourse.runInitializers();
|
||||
Discourse.start();
|
||||
|
||||
Discourse.Router.map(function() {
|
||||
Discourse.routeBuilder.call(this);
|
||||
|
||||
Reference in New Issue
Block a user