Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-02-21 22:32:43 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-02-21 22:32:43 +0400
commitce8eba89135c901fd4f04f1b2385bdbd23f48766 (patch)
tree4db466c5318d73fadae737f5de465f44d7bbdfd4 /spec
parent5c492a7089f72c50dc7ee26181dda99b5af529b3 (diff)
parent621bfdb4aa6c5ef2b031f7c4fb7753eb80d7a5b5 (diff)
Merge branch 'wiki'
Conflicts: app/views/layouts/_project_menu.html.haml
Diffstat (limited to 'spec')
-rw-r--r--spec/factories.rb5
-rw-r--r--spec/requests/wikis_spec.rb35
2 files changed, 40 insertions, 0 deletions
diff --git a/spec/factories.rb b/spec/factories.rb
index 15e54ed2120..6d7a4cb7ebe 100644
--- a/spec/factories.rb
+++ b/spec/factories.rb
@@ -59,3 +59,8 @@ end
Factory.add(:web_hook, WebHook) do |obj|
obj.url = Faker::Internet.url
end
+
+Factory.add(:wikis, WebHook) do |obj|
+ obj.title = Faker::Lorem.sentence
+ obj.content = Faker::Lorem.sentence
+end
diff --git a/spec/requests/wikis_spec.rb b/spec/requests/wikis_spec.rb
new file mode 100644
index 00000000000..fd66b5e4300
--- /dev/null
+++ b/spec/requests/wikis_spec.rb
@@ -0,0 +1,35 @@
+require 'spec_helper'
+
+describe "Wiki" do
+ let(:project) { Factory :project }
+
+ before do
+ login_as :user
+ project.add_access(@user, :read, :write)
+ end
+
+ describe "Add pages" do
+ before do
+ visit project_wiki_path(project, :index)
+ end
+
+ it "should see form" do
+ page.should have_content("Editing page")
+ end
+
+ it "should see added page" do
+ fill_in "Title", :with => 'Test title'
+ fill_in "Content", :with => '[link test](test)'
+ click_on "Save"
+
+ page.should have_content("Test title")
+ page.should have_content("link test")
+
+ click_link "link test"
+
+ page.should have_content("Editing page")
+ end
+
+ end
+
+end