Merge pull request #2886 from diasp/2823-fix-unlike-unfollow
#2823 fix unlike and unfollow update
This commit is contained in:
commit
f81a6ced01
1 changed files with 30 additions and 8 deletions
|
|
@ -8,6 +8,11 @@ describe("app.views.Post", function(){
|
||||||
reshares : {
|
reshares : {
|
||||||
one : "<%= count %> reshare",
|
one : "<%= count %> reshare",
|
||||||
other : "<%= count %> reshares"
|
other : "<%= count %> reshares"
|
||||||
|
},
|
||||||
|
likes : {
|
||||||
|
zero : "<%= count %> Likes",
|
||||||
|
one : "<%= count %> Like",
|
||||||
|
other : "<%= count %> Likes"
|
||||||
}
|
}
|
||||||
}})
|
}})
|
||||||
|
|
||||||
|
|
@ -18,6 +23,7 @@ describe("app.views.Post", function(){
|
||||||
this.reshare = this.collection.models[1];
|
this.reshare = this.collection.models[1];
|
||||||
})
|
})
|
||||||
|
|
||||||
|
context("reshare", function(){
|
||||||
it("displays a reshare count", function(){
|
it("displays a reshare count", function(){
|
||||||
this.statusMessage.set({reshares_count : 2})
|
this.statusMessage.set({reshares_count : 2})
|
||||||
var view = new app.views.Post({model : this.statusMessage}).render();
|
var view = new app.views.Post({model : this.statusMessage}).render();
|
||||||
|
|
@ -31,6 +37,22 @@ describe("app.views.Post", function(){
|
||||||
|
|
||||||
expect($(view.el).html()).not.toContain("0 Reshares")
|
expect($(view.el).html()).not.toContain("0 Reshares")
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|
||||||
|
context("likes", function(){
|
||||||
|
it("displays a like count", function(){
|
||||||
|
this.statusMessage.set({likes_count : 1})
|
||||||
|
var view = new app.views.Post({model : this.statusMessage}).render();
|
||||||
|
|
||||||
|
expect($(view.el).html()).toContain(Diaspora.I18n.t('stream.likes', {count: 1}))
|
||||||
|
})
|
||||||
|
it("does not display a like count for 'zero'", function(){
|
||||||
|
this.statusMessage.set({likes_count : 0})
|
||||||
|
var view = new app.views.Post({model : this.statusMessage}).render();
|
||||||
|
|
||||||
|
expect($(view.el).html()).not.toContain("0 Likes")
|
||||||
|
})
|
||||||
|
})
|
||||||
|
|
||||||
context("embed_html", function(){
|
context("embed_html", function(){
|
||||||
it("provides oembed html from the model response", function(){
|
it("provides oembed html from the model response", function(){
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue