Nuevo plugin Private Wiki 0.2.0
This commit is contained in:
parent
4e788bb03c
commit
49913ad11b
20 changed files with 480 additions and 0 deletions
29
plugins/redmine_private_wiki/test/unit/wiki_page_patch_test.rb
Executable file
29
plugins/redmine_private_wiki/test/unit/wiki_page_patch_test.rb
Executable file
|
@ -0,0 +1,29 @@
|
|||
require File.expand_path('../../test_helper',__FILE__)
|
||||
|
||||
class WikiPagePatchTest < ActiveSupport::TestCase
|
||||
|
||||
fixtures :projects, :wikis, :wiki_pages
|
||||
|
||||
setup do
|
||||
@controller = WikiController.new
|
||||
|
||||
@project = Project.find(1)
|
||||
@project.enable_module! :wiki
|
||||
@wiki = @project.wiki
|
||||
@page = @wiki.find_page('Another_page')
|
||||
@page.private = true
|
||||
@page.save!
|
||||
end
|
||||
|
||||
test 'has_private_parent_true' do
|
||||
#A page that has a private parent
|
||||
@page = @wiki.find_page('Child_1')
|
||||
assert_equal true, @page.has_private_parent?
|
||||
end
|
||||
|
||||
test 'has_private_parent_false' do
|
||||
#A page that doesn't have a private parent
|
||||
assert_equal true, !@page.has_private_parent?
|
||||
end
|
||||
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue