diff options
author | Rémy Coutable <remy@rymai.me> | 2017-09-12 10:04:20 +0300 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2017-09-12 10:50:26 +0300 |
commit | bb001ac3e5685294b500922a0ff807497c225a09 (patch) | |
tree | 8b9503667ce3a26b8ace779ef9372fc34d8af7cc /spec/features/projects/wiki | |
parent | 19df4a8a875e7ebe0fb70b97080c75b89a7ac440 (diff) |
Use WikiPages::CreateService in spec/features/projects/wiki/user_updates_wiki_page_spec.rb
Signed-off-by: Rémy Coutable <remy@rymai.me>
Diffstat (limited to 'spec/features/projects/wiki')
-rw-r--r-- | spec/features/projects/wiki/user_updates_wiki_page_spec.rb | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/spec/features/projects/wiki/user_updates_wiki_page_spec.rb b/spec/features/projects/wiki/user_updates_wiki_page_spec.rb index cfd6f3aa71f..1cf14204159 100644 --- a/spec/features/projects/wiki/user_updates_wiki_page_spec.rb +++ b/spec/features/projects/wiki/user_updates_wiki_page_spec.rb @@ -58,18 +58,8 @@ describe 'User updates wiki page' do end context 'when wiki is not empty' do - # This facory call is shorter: - # - # 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' }) } + 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' }) } before do visit(project_wikis_path(project)) |