diff --git a/spec/support/common_actions/documents.rb b/spec/support/common_actions/documents.rb index 52aa9b4d4..c6b8e0b44 100644 --- a/spec/support/common_actions/documents.rb +++ b/spec/support/common_actions/documents.rb @@ -1,8 +1,4 @@ module Documents - def do_login_for(user) - common_do_login_for(user, management: management) - end - def documentable_redirected_to_resource_show_or_navigate_to find("a", text: "Not now, go to my proposal") click_on "Not now, go to my proposal" diff --git a/spec/support/common_actions/images.rb b/spec/support/common_actions/images.rb index b5fd9430b..36a5dbbc6 100644 --- a/spec/support/common_actions/images.rb +++ b/spec/support/common_actions/images.rb @@ -1,8 +1,4 @@ module Images - def do_login_for(user) - common_do_login_for(user, management: management) - end - def imageable_redirected_to_resource_show_or_navigate_to case imageable.class.to_s when "Budget" diff --git a/spec/support/common_actions/maps.rb b/spec/support/common_actions/maps.rb index 1efa539d4..37358bcb4 100644 --- a/spec/support/common_actions/maps.rb +++ b/spec/support/common_actions/maps.rb @@ -1,8 +1,4 @@ module Maps - def do_login_for(user) - common_do_login_for(user, management: management) - end - def fill_in_proposal_form fill_in_new_proposal_title with: "Help refugees" fill_in "Proposal summary", with: "In summary, what we want is..." diff --git a/spec/support/common_actions/users.rb b/spec/support/common_actions/users.rb index 59d86682f..108e36636 100644 --- a/spec/support/common_actions/users.rb +++ b/spec/support/common_actions/users.rb @@ -82,6 +82,10 @@ module Users expect(find(".top-bar-right")).not_to have_content "My account" end + def do_login_for(user) + common_do_login_for(user, management: management) + end + def common_do_login_for(user, management:) if management login_managed_user(user)