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
aa2b0a87
Commit
aa2b0a87
authored
May 13, 2011
by
Eric Davis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[
#123
#407] Deferred Journal#visible tests
parent
adf57a64
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
journal_test.rb
test/unit/journal_test.rb
+4
-4
No files found.
test/unit/journal_test.rb
View file @
aa2b0a87
...
...
@@ -51,7 +51,7 @@ class JournalTest < ActiveSupport::TestCase
assert_equal
1
,
ActionMailer
::
Base
.
deliveries
.
size
end
def
test_visible_scope_for_anonymous
should_eventually
"test_visible_scope_for_anonymous"
do
# Anonymous user should see issues of public projects only
journals
=
Journal
.
visible
(
User
.
anonymous
).
all
assert
journals
.
any?
...
...
@@ -61,8 +61,8 @@ class JournalTest < ActiveSupport::TestCase
journals
=
Journal
.
visible
(
User
.
anonymous
).
all
assert
journals
.
empty?
end
def
test_visible_scope_for_user
should_eventually
"test_visible_scope_for_user"
do
user
=
User
.
find
(
9
)
assert
user
.
projects
.
empty?
# Non member user should see issues of public projects only
...
...
@@ -82,7 +82,7 @@ class JournalTest < ActiveSupport::TestCase
assert_nil
journals
.
detect
{
|
journal
|
journal
.
issue
.
project_id
!=
1
}
end
def
test_visible_scope_for_admin
should_eventually
"test_visible_scope_for_admin"
do
user
=
User
.
find
(
1
)
user
.
members
.
each
(
&
:destroy
)
assert
user
.
projects
.
empty?
...
...
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