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
fb7f109a
Commit
fb7f109a
authored
Nov 17, 2011
by
Gregor Schmidt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[#708] Adding tests exposing the erroneous behavior
parent
e2938d26
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
journal_test.rb
test/unit/journal_test.rb
+25
-0
No files found.
test/unit/journal_test.rb
View file @
fb7f109a
...
...
@@ -115,4 +115,29 @@ class JournalTest < ActiveSupport::TestCase
assert_equal
"Test setting fields on Journal from Issue"
,
@issue
.
last_journal
.
notes
assert_equal
@issue
.
author
,
@issue
.
last_journal
.
user
end
test
"subclasses of journaled models should have journal of parent type"
do
Ticket
=
Class
.
new
(
Issue
)
project
=
Project
.
generate!
ticket
=
Ticket
.
new
do
|
t
|
t
.
project
=
project
t
.
subject
=
"Test initial journal"
t
.
tracker
=
project
.
trackers
.
first
t
.
author
=
User
.
generate!
t
.
description
=
"Some content"
end
begin
oldstdout
=
$stdout
$stdout
=
StringIO
.
new
ticket
.
save!
assert
$stdout
.
string
.
empty?
,
"No errors should be logged to stdout."
ensure
$stdout
=
oldstdout
end
journal
=
ticket
.
journals
.
first
assert_equal
IssueJournal
,
journal
.
class
end
end
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