Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
O
OHR Support
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
97
Issues
97
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
OHR Support
Commits
61f0e67c
Commit
61f0e67c
authored
Apr 21, 2011
by
Felix Schäfer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade tests to new journals type.
parent
ef8141a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
wiki_controller_test.rb
test/functional/wiki_controller_test.rb
+7
-7
No files found.
test/functional/wiki_controller_test.rb
View file @
61f0e67c
...
...
@@ -112,13 +112,13 @@ class WikiControllerTest < ActionController::TestCase
@request
.
session
[
:user_id
]
=
2
assert_no_difference
'WikiPage.count'
do
assert_no_difference
'WikiContent.count'
do
assert_difference
'WikiContent
::Version
.count'
do
assert_difference
'WikiContent
Journal
.count'
do
put
:update
,
:project_id
=>
1
,
:id
=>
'Another_page'
,
:content
=>
{
:comments
=>
"my comments"
,
:text
=>
"edited"
,
:version
=>
1
:
lock_
version
=>
1
}
end
end
...
...
@@ -135,13 +135,13 @@ class WikiControllerTest < ActionController::TestCase
@request
.
session
[
:user_id
]
=
2
assert_no_difference
'WikiPage.count'
do
assert_no_difference
'WikiContent.count'
do
assert_no_difference
'WikiContent
::Version
.count'
do
assert_no_difference
'WikiContent
Journal
.count'
do
put
:update
,
:project_id
=>
1
,
:id
=>
'Another_page'
,
:content
=>
{
:comments
=>
'a'
*
300
,
# failure here, comment is too long
:text
=>
'edited'
,
:version
=>
1
:
lock_
version
=>
1
}
end
end
...
...
@@ -151,7 +151,7 @@ class WikiControllerTest < ActionController::TestCase
assert_error_tag
:descendant
=>
{
:content
=>
/Comment is too long/
}
assert_tag
:tag
=>
'textarea'
,
:attributes
=>
{
:id
=>
'content_text'
},
:content
=>
'edited'
assert_tag
:tag
=>
'input'
,
:attributes
=>
{
:id
=>
'content_version'
,
:value
=>
'1'
}
assert_tag
:tag
=>
'input'
,
:attributes
=>
{
:id
=>
'content_
lock_
version'
,
:value
=>
'1'
}
end
def
test_preview
...
...
@@ -159,7 +159,7 @@ class WikiControllerTest < ActionController::TestCase
xhr
:post
,
:preview
,
:project_id
=>
1
,
:id
=>
'CookBook_documentation'
,
:content
=>
{
:comments
=>
''
,
:text
=>
'this is a *previewed text*'
,
:version
=>
3
}
:
lock_
version
=>
3
}
assert_response
:success
assert_template
'common/_preview'
assert_tag
:tag
=>
'strong'
,
:content
=>
/previewed text/
...
...
@@ -170,7 +170,7 @@ class WikiControllerTest < ActionController::TestCase
xhr
:post
,
:preview
,
:project_id
=>
1
,
:id
=>
'New page'
,
:content
=>
{
:text
=>
'h1. New page'
,
:comments
=>
''
,
:version
=>
0
}
:
lock_
version
=>
0
}
assert_response
:success
assert_template
'common/_preview'
assert_tag
:tag
=>
'h1'
,
:content
=>
/New page/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment