Skip to content

Commit

Permalink
Fixing Standard Ruby
Browse files Browse the repository at this point in the history
  • Loading branch information
gazayas committed Aug 19, 2023
1 parent a7da933 commit 0ae8bed
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/system/invitations_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -184,20 +184,20 @@ class InvitationDetailsTest < ApplicationSystemTestCase
assert page.has_content?("Please correct the errors below.")

# Fill in the email addresses.
email_fields = page.all('label', text: 'Email Address')
email_fields = page.all("label", text: "Email Address")
email_fields.each_with_index do |field, idx|
field.sibling('div').find('input').fill_in with: "test-#{idx}@some-company.com"
field.sibling("div").find("input").fill_in with: "test-#{idx}@some-company.com"
end

# Select roles
role_ids = ["Default", "Editor", "Admin"]
role_fields = page.all('label', text: 'Role ids')
role_fields = page.all("label", text: "Role ids")
role_fields.each_with_index do |role_field, idx|
select_field = role_field.sibling('div').find('select')
select_field.all('option').find {|opt| opt.text == role_ids[idx]}.select_option
select_field = role_field.sibling("div").find("select")
select_field.all("option").find { |opt| opt.text == role_ids[idx] }.select_option
end

assert_difference(['Invitation.count', 'Membership.count'], 3) do
assert_difference(["Invitation.count", "Membership.count"], 3) do
click_on "Next"
sleep 2
end
Expand Down

0 comments on commit 0ae8bed

Please sign in to comment.