Remove method duplications as only the latest method loaded is used
The `management` variable gets its value from the caller context.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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"
|
||||
|
||||
@@ -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..."
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user