Commit 3b1993a8 authored by Phil Hughes's avatar Phil Hughes

rspec test fixes

parent 38f15514
...@@ -166,12 +166,10 @@ describe 'New/edit issue', :js do ...@@ -166,12 +166,10 @@ describe 'New/edit issue', :js do
end end
end end
page.within '.issuable-meta' do page.within '.breadcrumbs' do
issue = Issue.find_by(title: 'title') issue = Issue.find_by(title: 'title')
expect(page).to have_text("Issue #{issue.to_reference}") expect(page).to have_text("Issues #{issue.to_reference}")
# compare paths because the host differ in test
expect(find_link(issue.to_reference)[:href]).to end_with(issue_path(issue))
end end
end end
......
...@@ -84,13 +84,10 @@ describe 'New/edit merge request', :js do ...@@ -84,13 +84,10 @@ describe 'New/edit merge request', :js do
end end
end end
page.within '.issuable-meta' do page.within '.breadcrumbs' do
merge_request = MergeRequest.find_by(source_branch: 'fix') merge_request = MergeRequest.find_by(source_branch: 'fix')
expect(page).to have_text("Merge request #{merge_request.to_reference}") expect(page).to have_text("Merge Requests #{merge_request.to_reference}")
# compare paths because the host differ in test
expect(find_link(merge_request.to_reference)[:href])
.to end_with(merge_request_path(merge_request))
end end
end end
......
...@@ -91,7 +91,9 @@ describe GroupsHelper do ...@@ -91,7 +91,9 @@ describe GroupsHelper do
let!(:very_deep_nested_group) { create(:group, parent: deep_nested_group) } let!(:very_deep_nested_group) { create(:group, parent: deep_nested_group) }
it 'outputs the groups in the correct order' do it 'outputs the groups in the correct order' do
expect(helper.group_title(very_deep_nested_group)).to match(/>#{group.name}<\/a>.*>#{nested_group.name}<\/a>.*>#{deep_nested_group.name}<\/a>/) expect(helper.group_title(very_deep_nested_group))
.to match(/<li style="text-indent: 16px;"><a.*>#{deep_nested_group.name}.*<\/li>.*<a.*>#{very_deep_nested_group.name}<\/a>/m)
# expect(helper.group_title(very_deep_nested_group)).to match(/<\/li>.*<a.*>#{very_deep_nested_group.name}<\/a>/)
end 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