From 85f6c16a7e38f7bbbde00c2b751b7217a2d3e79f Mon Sep 17 00:00:00 2001 From: Amina Date: Mon, 18 Mar 2019 21:09:59 +0000 Subject: [PATCH] added unit test for Tag.related method (#5129) * added unit test for Tag.related method * post review correction --- test/unit/tag_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/unit/tag_test.rb b/test/unit/tag_test.rb index c1883a530d3..0c44f7e0e05 100644 --- a/test/unit/tag_test.rb +++ b/test/unit/tag_test.rb @@ -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?