Merge branch 'wiki'
Conflicts: app/views/layouts/_project_menu.html.haml
This commit is contained in:
commit
ce8eba8913
22 changed files with 294 additions and 17 deletions
|
@ -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
|
||||
|
|
35
spec/requests/wikis_spec.rb
Normal file
35
spec/requests/wikis_spec.rb
Normal file
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue