work on related tag js

This commit is contained in:
albert
2011-09-30 18:20:29 -04:00
parent 3748934648
commit af8a0aaa76
8 changed files with 141 additions and 2 deletions

View File

@@ -0,0 +1,7 @@
require 'test_helper'
class RelatedTagsControllerTest < ActionController::TestCase
# test "the truth" do
# assert true
# end
end

View File

@@ -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