diff --git a/features/blocks_user.feature b/features/blocks_user.feature index d74620b1a..73e38bf86 100644 --- a/features/blocks_user.feature +++ b/features/blocks_user.feature @@ -5,11 +5,22 @@ Feature: Blocking a user from the stream And a user named "Alice Smith" with email "alice@alice.alice" And a user with email "bob@bob.bob" is connected with "alice@alice.alice" And Alice has a post mentioning Bob + And I sign in as "bob@bob.bob" Scenario: Blocking a user - When I sign in as "bob@bob.bob" - And I am on the home page + When I am on the home page + And I preemptively confirm the alert + And I wait for the ajax to finish + When I click on the first block button + And I am on the home page + And I wait for the ajax to finish + Then I should not see any posts in my stream + + Scenario: Blocking a user from the profile page + When I am on the home page + And I follow "Alice Smith" + And I wait for the ajax to finish And I preemptively confirm the alert And I wait for the ajax to finish When I click on the first block button diff --git a/public/javascripts/app/models/block.js b/public/javascripts/app/models/block.js index 23809dec4..ef7e8f1ef 100644 --- a/public/javascripts/app/models/block.js +++ b/public/javascripts/app/models/block.js @@ -1,3 +1,3 @@ app.models.Block = Backbone.Model.extend({ - urlRoot : "blocks" + urlRoot : "/blocks" }); diff --git a/public/javascripts/app/templates/stream-element.handlebars b/public/javascripts/app/templates/stream-element.handlebars index 47b59963d..5d9baf2ba 100644 --- a/public/javascripts/app/templates/stream-element.handlebars +++ b/public/javascripts/app/templates/stream-element.handlebars @@ -2,7 +2,7 @@ {{#if current_user}}