Skip to content

Commit

Permalink
Use existing step
Browse files Browse the repository at this point in the history
  • Loading branch information
brianjaustin committed Jan 24, 2025
1 parent 0a4454c commit 7e9461b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 8 deletions.
4 changes: 2 additions & 2 deletions features/admins/admin_invitations.feature
Original file line number Diff line number Diff line change
Expand Up @@ -474,7 +474,7 @@ Feature: Admin Actions to Manage Invitations
And the user "invitee" exists and is activated
And an invitation created by "creator" and used by "invitee"
And I am logged in as a "<role>" admin
When I manage invitations belonging to "creator"
When I go to creator's manage invitations page
Then I should see "invitee"
When I view the most recent invitation for "creator"
Then I should see "invitee"
Expand All @@ -483,7 +483,7 @@ Feature: Admin Actions to Manage Invitations
When I am logged in as "invitee"
And "invitee" deletes their account
And I am logged in as a "<role>" admin
And I manage invitations belonging to "creator"
And I go to creator's manage invitations page
Then I should see "(Deleted)"
But I should not see "invitee"
When I view the most recent invitation for "creator"
Expand Down
4 changes: 2 additions & 2 deletions features/other_a/invite_use.feature
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ I want to use an invitation to create an account
And the user "invitee" exists and is activated
And an invitation created by "creator" and used by "invitee"
And I am logged in as "creator"
When I manage invitations belonging to "creator"
When I go to creator's manage invitations page
Then I should see "invitee"
When I view the most recent invitation for "creator"
Then I should see "invitee"
When I am logged in as "invitee"
And "invitee" deletes their account
And I am logged in as "creator"
And I manage invitations belonging to "creator"
And I go to creator's manage invitations page
Then I should see "Deleted User"
But I should not see "invitee"
When I view the most recent invitation for "creator"
Expand Down
4 changes: 0 additions & 4 deletions features/step_definitions/invite_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -162,10 +162,6 @@ def invite(attributes = {})
click_button("Look me up")
end

When "I manage invitations belonging to {string}" do |creator|
visit manage_user_invitations_path(creator)
end

When "I view the most recent invitation for {string}" do |creator|
user = User.find_by(login: creator)
invitation = user.invitations.last
Expand Down

0 comments on commit 7e9461b

Please sign in to comment.