Revision 1fa008a4
Added by Joseph Magen over 10 years ago
test/integration/organization_test.rb | ||
---|---|---|
assert_new_button(organizations_path,"New Organization",new_organization_path)
|
||
fill_in "organization_name", :with => "Finance"
|
||
click_button "Submit"
|
||
assert_equal step2_organization_path(Organization.order(:id).last), current_path, "redirect path #{step2_organization_path(Organization.order(:id).last)} was expected but it was #{current_path}"
|
||
assert_equal step2_organization_path(Organization.unscoped.order(:id).last), current_path, "redirect path #{step2_organization_path(Organization.unscoped.order(:id).last)} was expected but it was #{current_path}"
|
||
click_link "Assign All"
|
||
assert_equal organizations_path, current_path, "redirect path #{organizations_path} was expected but it was #{current_path}"
|
||
assert page.has_link? "Finance"
|
||
... | ... | |
assert_new_button(organizations_path,"New Organization",new_organization_path)
|
||
fill_in "organization_name", :with => "Finance"
|
||
click_button "Submit"
|
||
assert_equal step2_organization_path(Organization.order(:id).last), current_path, "redirect path #{step2_organization_path(Organization.order(:id).last)} was expected but it was #{current_path}"
|
||
assert_equal step2_organization_path(Organization.unscoped.order(:id).last), current_path, "redirect path #{step2_organization_path(Organization.unscoped.order(:id).last)} was expected but it was #{current_path}"
|
||
click_link "Manually Assign"
|
||
assert_equal assign_hosts_organization_path(Organization.order(:id).last), current_path, "redirect path #{assign_hosts_organization_path(Organization.order(:id).last)} was expected but it was #{current_path}"
|
||
assert_equal assign_hosts_organization_path(Organization.unscoped.order(:id).last), current_path, "redirect path #{assign_hosts_organization_path(Organization.unscoped.order(:id).last)} was expected but it was #{current_path}"
|
||
assert_submit_button(organizations_path, "Assign to Organization")
|
||
assert page.has_link? "Finance"
|
||
end
|
||
... | ... | |
assert_new_button(organizations_path,"New Organization",new_organization_path)
|
||
fill_in "organization_name", :with => "Finance"
|
||
click_button "Submit"
|
||
assert_equal step2_organization_path(Organization.order(:id).last), current_path, "redirect path #{step2_organization_path(Organization.order(:id).last)} was expected but it was #{current_path}"
|
||
assert_equal step2_organization_path(Organization.unscoped.order(:id).last), current_path, "redirect path #{step2_organization_path(Organization.unscoped.order(:id).last)} was expected but it was #{current_path}"
|
||
click_link "Proceed to Edit"
|
||
assert_equal edit_organization_path(Organization.order(:id).last), current_path, "redirect path #{edit_organization_path(Organization.order(:id).last)} was expected but it was #{current_path}"
|
||
assert_equal edit_organization_path(Organization.unscoped.order(:id).last), current_path, "redirect path #{edit_organization_path(Organization.unscoped.order(:id).last)} was expected but it was #{current_path}"
|
||
assert page.has_selector?('h1', :text => "Edit"), "Edit was expected in the <h1> tag, but was not found"
|
||
end
|
||
|
Also available in: Unified diff
fixes #3912 - add inheritance for locations / organizations