Commit 5d3f7b13 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch '37729-fix-wiki-page-let' into 'master'

Fix a `wiki_page` factory instantiation for the case when project's namespace is a group

Closes #37729

See merge request !14205
parents 19df4a8a bb001ac3
...@@ -58,18 +58,8 @@ describe 'User updates wiki page' do ...@@ -58,18 +58,8 @@ describe 'User updates wiki page' do
end end
context 'when wiki is not empty' do context 'when wiki is not empty' do
# This facory call is shorter: let(:project_wiki) { create(:project_wiki, project: project, user: project.creator) }
# let!(:wiki_page) { create(:wiki_page, wiki: project_wiki, attrs: { title: 'home', content: 'Home page' }) }
# create(:wiki_page, wiki: create(:project, namespace: user.namespace).wiki, attrs: { title: 'home', content: 'Home page' })
#
# But it always fails with this:
#
# Failure/Error: click_link('Edit')
# Capybara::ElementNotFound:
# Unable to find visible link "Edit"
let(:project) { create(:project, namespace: user.namespace) }
let!(:wiki_page) { create(:wiki_page, wiki: project.wiki, attrs: { title: 'home', content: 'Home page' }) }
before do before do
visit(project_wikis_path(project)) visit(project_wikis_path(project))
......
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