Skip to content

Commit

Permalink
AO3-3997 more fixes for invite
Browse files Browse the repository at this point in the history
  • Loading branch information
potpotkettle committed Jul 7, 2023
1 parent 2de6037 commit 30bcfdd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions app/views/invitations/_invitation.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<dd><%= invitation.invitee_email %></dd>
<% else %>
<dd>
<%= error_messages_for @invitation %>
<%= form_for(invitation) do |f| %>
<p><%= label_tag "invitation[invitee_email]", t('.email_address_label') %>: <%= f.text_field :invitee_email %></p>
<%= error_messages_for invitation %>
<p><%= f.label :invitee_email, t(".email_address_label") %> <%= f.text_field :invitee_email %></p>
<p><%= hidden_field_tag :user_id, @user.try(:login) %></p>
<p class="submit actions"><%= f.submit %></p>
<% end %>
Expand Down
14 changes: 6 additions & 8 deletions features/other_a/invite_request.feature
Original file line number Diff line number Diff line change
Expand Up @@ -64,14 +64,12 @@ Feature: Invite requests

Scenario: User can fail to send an invitation to an invalid email address

Given invitations are required
And I am logged in as "user1"
And I request some invites
And an admin grants the request
And I try to invite a friend from my user page
When all emails have been delivered
And I fill in "invitation[invitee_email]" with "test@"
And I press "Send Invitation"
Given I am logged in as "user1"
And "user1" has "1" invitation
And I am on user1's manage invitations page
When I follow the link for "user1" first invite
And I fill in "Enter an email address" with "test@"
And I press "Update Invitation"
Then I should see "Invitee email should look like an email address"
Scenario: User can send out invites they have been granted, and the recipient can sign up
Expand Down

0 comments on commit 30bcfdd

Please sign in to comment.