Skip to content

Commit

Permalink
added unit test for Tag.related method (publiclab#5129)
Browse files Browse the repository at this point in the history
* added unit test for Tag.related method

* post review correction
  • Loading branch information
Nirvikalpa108 authored and jywarren committed Mar 18, 2019
1 parent 4501734 commit 85f6c16
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/unit/tag_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ class TagTest < ActiveSupport::TestCase
assert followers.include?(tag_selections(:awesome).user)
end

test 'related tags' do
related = Tag.related(tags(:awesome).name)
assert !related.empty?
assert related.include?(tags(:test))
end

test 'tag subscribers' do
subscribers = Tag.subscribers([tags(:awesome)])
assert !subscribers.empty?
Expand Down

0 comments on commit 85f6c16

Please sign in to comment.