work on related tag js
This commit is contained in:
7
test/functional/related_tags_controller_test.rb
Normal file
7
test/functional/related_tags_controller_test.rb
Normal file
@@ -0,0 +1,7 @@
|
||||
require 'test_helper'
|
||||
|
||||
class RelatedTagsControllerTest < ActionController::TestCase
|
||||
# test "the truth" do
|
||||
# assert true
|
||||
# end
|
||||
end
|
||||
@@ -24,6 +24,10 @@ class RelatedTagQueryTest < ActiveSupport::TestCase
|
||||
should "work" do
|
||||
assert_equal(["aaa", "bbb", "ccc"], @query.tags)
|
||||
end
|
||||
|
||||
should "render the json" do
|
||||
assert_equal("{\"query\":\"aaa\",\"category\":\"\",\"tags\":[[\"aaa\",0],[\"bbb\",0],[\"ccc\",0]],\"wiki_page_tags\":[]}", @query.to_json)
|
||||
end
|
||||
end
|
||||
|
||||
context "for a tag that doesn't exist" do
|
||||
|
||||
Reference in New Issue
Block a user