Category List and Topic View Integration Test

This commit is contained in:
Robin Ward
2013-06-20 15:02:02 -04:00
parent 3775a9c11d
commit 3257bef387
7 changed files with 43 additions and 4 deletions

View File

@@ -22,6 +22,9 @@ Discourse = Ember.Application.createWithMixins({
// The highest seen post number by topic
highestSeenByTopic: {},
// Helps with integration tests
URL_FIXTURES: {},
getURL: function(url) {
// If it's a non relative URL, return it.

View File

@@ -388,7 +388,10 @@ Discourse.TopicView = Discourse.View.extend(Discourse.Scrolling, {
nonUrgentPositionUpdate: Discourse.debounce(function(opts) {
Discourse.ScreenTrack.instance().scrolled();
this.set('controller.currentPost', opts.currentPost);
var model = this.get('controller.model');
if (model) {
this.set('controller.currentPost', opts.currentPost);
}
},500),
scrolled: function(){