We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 07dd97b commit b8a89d0Copy full SHA for b8a89d0
2 files changed
features/messages.feature
@@ -8,3 +8,8 @@ Feature: Messages
8
And I press "Send message"
9
Then I should be on the hacker page for "fela"
10
And I should see "Message sent."
11
+ Scenario: I can't send a message when not logged in
12
+ Given I'm not logged in
13
+ And there's a hacker with the username "fela"
14
+ When I go to the hacker page for "fela"
15
+ Then I should not see "Send fela a message"
views/hackers/show.haml
@@ -1,3 +1,4 @@
1
%p= @hacker.username + "'s page"
2
3
-%a{:href => "/messages/new/to/#{@hacker.username}" }= "Send #{@hacker.username} a message"
+- if logged_in?
4
+ %a{:href => "/messages/new/to/#{@hacker.username}" }= "Send #{@hacker.username} a message"
0 commit comments