-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reshares_count come back! Fix #3370 #3700
Conversation
Again, you can just update an existing pull request by (force) pushing to the same branch, no need to open a myriad of pull requests for each feature/bug ;). For example to edit the last commit, checkout the existing branch, make the changes and run Now sadly Travis is unhappy about this change, can you take a look? |
Sorry, I'm a stubborn :[ Diabolic-Travis now is happy |
this.interactions.reshare(); | ||
expect(this.userReshare.change).not.toHaveBeenCalled(); | ||
}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, this one confuses me, the description says the opposite of what's tested. Since it passes, what's the desired behaviour now?
I understand. The description should be I added this test to see that for reshare: function () did haven't a test. But I think the major change to the test, was added this https://github.com/diaspora/diaspora/pull/3700/files#L4R31 and https://github.com/diaspora/diaspora/pull/3700/files#L4R38 |
I'm a backbone noob, so what would it mean if it's called? What's the effect and why is it undesired? |
I'm a ALL noob :] . I understand that the author is unable to reshare the publication |
I think you need to rebase now, since the changelog was altered by another PR. And, you introduced a syntax error in the spec file... you need to change it like so: --- a/spec/javascripts/app/views/stream_post_spec.js
+++ b/spec/javascripts/app/views/stream_post_spec.js
@@ -28,19 +28,19 @@ describe("app.views.StreamPost", function(){
context("reshare", function(){
it("displays a reshare count", function(){
- this.statusMessage.set({interactions.reshares_count : 2})
+ this.statusMessage.set({ interactions: {reshares_count : 2 }});
var view = new this.PostViewClass({model : this.statusMessage}).render();
- expect($(view.el).html()).toContain(Diaspora.I18n.t('stream.reshares', {count: 2}))
- })
+ expect($(view.el).html()).toContain(Diaspora.I18n.t('stream.reshares', {count: 2}));
+ });
it("does not display a reshare count for 'zero'", function(){
- this.statusMessage.set({interactions.reshares_count : 0})
+ this.statusMessage.interactions.set({ interactions: { reshares_count : 0}} );
var view = new this.PostViewClass({model : this.statusMessage}).render();
- 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(){ |
Oks thank you. I'm on it. |
Sorry about the mess O-O She's ready for the dance. |
"This pull request cannot be automatically merged." Sad face. For what it's worth, I can test this on my localpod, and provided that everything works, I can merge it for you. Would love to see reshare counts to return to the stream. |
Works great, merging. Thanks Movilla! :D |
In previous episodes... #3699
#3370