Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlya Zhitomirskiy <ilya@laptop.(none)>2011-05-27 01:41:38 +0400
committerRaphael Sofaer <raphael@joindiaspora.com>2011-07-22 05:22:17 +0400
commitce9477976603cdb000d6e7095b13dc548235f99c (patch)
treedc2fbf43b30ca63846e7b97946c339e65aaf868c /features
parentfa9269541fa89b4ed4061cd19a99b4bc89b0a184 (diff)
not showing the reshare button to the users on things they can't reshare
Diffstat (limited to 'features')
-rw-r--r--features/repost.feature26
-rw-r--r--features/step_definitions/posts_steps.rb6
2 files changed, 31 insertions, 1 deletions
diff --git a/features/repost.feature b/features/repost.feature
index 1be45daaf..a54e1e798 100644
--- a/features/repost.feature
+++ b/features/repost.feature
@@ -8,13 +8,30 @@ Feature: public repost
Given a user named "Bob Jones" with email "bob@bob.bob"
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"
+
+
+ Scenario: does not show the reshare button on my own posts
+ And "bob@bob.bob" has a non public post with text "reshare this!"
+ And I sign in as "bob@bob.bob"
+ Then I should not see "Reshare"
+
+ Scenario: does not show a reshare button on other private pots
+ And "bob@bob.bob" has a non public post with text "reshare this!"
+ And I sign in as "alice@alice.alice"
+ Then I should not see "Reshare"
+
+ Scenario: does shows the reshare button on my own posts
+ And "bob@bob.bob" has a public post with text "reshare this!"
+ And I sign in as "alice@alice.alice"
+ Then I should see "Reshare"
+
+ Scenario: shows up on the profile page
And "bob@bob.bob" has a public post with text "reshare this!"
And I sign in as "alice@alice.alice"
And I preemptively confirm the alert
And I follow "Reshare"
And I wait for the ajax to finish
- Scenario: shows up on the profile page
Then I should see a ".reshared"
And I am on "alice@alice.alice"'s page
Then I should see "reshare this!"
@@ -22,8 +39,15 @@ Feature: public repost
And I should see "Bob"
Scenario: shows up on the aspects page
+ And "bob@bob.bob" has a public post with text "reshare this!"
+ And I sign in as "alice@alice.alice"
+ And I preemptively confirm the alert
+ And I follow "Reshare"
+ And I wait for the ajax to finish
+
Then I should see a ".reshared"
And I follow "All Aspects"
Then I should see "reshare this!"
Then I should see a ".reshared"
And I should see "Bob"
+
diff --git a/features/step_definitions/posts_steps.rb b/features/step_definitions/posts_steps.rb
index 6e3661333..d9879e72a 100644
--- a/features/step_definitions/posts_steps.rb
+++ b/features/step_definitions/posts_steps.rb
@@ -13,3 +13,9 @@ Given /^"([^"]*)" has a public post with text "([^"]*)"$/ do |email, text|
user = User.find_by_email(email)
user.post(:status_message, :text => text, :public => true, :to => user.aspects)
end
+
+Given /^"([^"]*)" has a non public post with text "([^"]*)"$/ do |email, text|
+ user = User.find_by_email(email)
+ user.post(:status_message, :text => text, :public => false, :to => user.aspects)
+end
+