summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroyuki Sato <sathiroyuki@gmail.com>2017-03-09 13:25:15 +0900
committerHiroyuki Sato <sathiroyuki@gmail.com>2017-03-09 13:25:15 +0900
commit839018d2d4e3e899b1fa06a43d093a0fdceced42 (patch)
tree36b63e2213a0fcc0f9adafc016bb381fdec96f66
parenta5521bad4012a9eea21cb067271c8ec1810c6d8c (diff)
downloadgitlab-ce-839018d2d4e3e899b1fa06a43d093a0fdceced42.tar.gz
Refactor spec
-rw-r--r--spec/features/projects/wiki/user_updates_wiki_page_spec.rb4
1 files changed, 2 insertions, 2 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 a15bb3ad46b..56ce6aa8b1f 100644
--- a/spec/features/projects/wiki/user_updates_wiki_page_spec.rb
+++ b/spec/features/projects/wiki/user_updates_wiki_page_spec.rb
@@ -2,13 +2,13 @@ require 'spec_helper'
feature 'Projects > Wiki > User updates wiki page', feature: true do
let(:user) { create(:user) }
+ let!(:wiki_page) { WikiPages::CreateService.new(project, user, title: 'home', content: 'Home page').execute }
background do
project.team << [user, :master]
login_as(user)
visit namespace_project_path(project.namespace, project)
- @wiki_page = WikiPages::CreateService.new(project, user, title: 'home', content: 'Home page').execute
click_link 'Wiki'
end
@@ -29,7 +29,7 @@ feature 'Projects > Wiki > User updates wiki page', feature: true do
scenario 'page has been updated since the user opened the edit page' do
click_link 'Edit'
- @wiki_page.update("Update")
+ wiki_page.update('Update')
click_button 'Save changes'