Commit a1d22274 authored by Luke Bennett's avatar Luke Bennett

use expect_mirror_to_have_error_and_timeago in remote_mirror_spec

parent 5f1dfa9a
...@@ -17,9 +17,7 @@ describe 'Project remote mirror', :feature do ...@@ -17,9 +17,7 @@ describe 'Project remote mirror', :feature do
visit project_mirror_path(project) visit project_mirror_path(project)
row = first('.js-mirrors-table-body tr') expect_mirror_to_have_error_and_timeago('Never')
expect(row).to have_content('Error')
expect(row).to have_content('Never')
end end
end end
...@@ -29,10 +27,14 @@ describe 'Project remote mirror', :feature do ...@@ -29,10 +27,14 @@ describe 'Project remote mirror', :feature do
visit project_mirror_path(project) visit project_mirror_path(project)
row = first('.js-mirrors-table-body tr') expect_mirror_to_have_error_and_timeago('5 minutes ago')
expect(row).to have_content('Error')
expect(row).to have_content('5 minutes ago')
end end
end end
def expect_mirror_to_have_error_and_timeago(timeago)
row = first('.js-mirrors-table-body tr')
expect(row).to have_content('Error')
expect(row).to have_content(timeago)
end
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment