test/viewed_test.rb in redmine_crm-0.0.21 vs test/viewed_test.rb in redmine_crm-0.0.22
- old
+ new
@@ -10,16 +10,19 @@
issue = issues(:first_issue)
end
def test_zero_of_view_count
- assert_equal issue.view_count, 0
+ assert_equal issue.view_count, "0(0)"
end
def test_can_view
issue.view '127.0.0.1', user
- assert_equal issue.view_count, 1
+ assert_equal issue.view_count, "1(1)"
+ # second view change only total count
+ issue.view '127.0.0.1', user
+ assert_equal issue.view_count, "2(1)"
end
def test_viewed_by
assert !issue.viewed_by?('127.0.0.1', user)
issue.view '127.0.0.1', user
@@ -27,10 +30,10 @@
end
def test_twice_view
issue.view '127.0.0.1', user
issue.view '127.0.0.1', user
- assert_equal issue.view_count, 1
+ assert_equal "2(1)", issue.view_count
end
def test_viewed?
assert !issue.viewed?
issue.view '127.0.0.1', user
\ No newline at end of file