use expect_mirror_to_have_error_and_timeago in remote_mirror_spec
This commit is contained in:
parent
5f1dfa9a22
commit
a1d2227404
1 changed files with 8 additions and 6 deletions
|
@ -17,9 +17,7 @@ describe 'Project remote mirror', :feature do
|
|||
|
||||
visit project_mirror_path(project)
|
||||
|
||||
row = first('.js-mirrors-table-body tr')
|
||||
expect(row).to have_content('Error')
|
||||
expect(row).to have_content('Never')
|
||||
expect_mirror_to_have_error_and_timeago('Never')
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -29,10 +27,14 @@ describe 'Project remote mirror', :feature do
|
|||
|
||||
visit project_mirror_path(project)
|
||||
|
||||
row = first('.js-mirrors-table-body tr')
|
||||
expect(row).to have_content('Error')
|
||||
expect(row).to have_content('5 minutes ago')
|
||||
expect_mirror_to_have_error_and_timeago('5 minutes ago')
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue