* Created js popup for some of the secondary links in the main navbar

* aliases/implications must now be approved
* anyone can now submit an alias
This commit is contained in:
albert
2011-10-24 01:01:45 -04:00
parent f94b65f5d5
commit f2f524b87f
11 changed files with 80 additions and 48 deletions

View File

@@ -29,17 +29,6 @@ class NotesControllerTest < ActionController::TestCase
end
end
context "show action" do
setup do
@note = Factory.create(:note)
end
should "render" do
get :show, {:id => @note.id}
assert_response :success
end
end
context "create action" do
should "create a note" do
assert_difference("Note.count", 1) do

View File

@@ -66,7 +66,7 @@ class PostVersionTest < ActiveSupport::TestCase
assert_equal(2, @post.versions.size)
@version = @post.versions.last
assert_equal("bbb ccc xxx", @version.tags)
assert_nil(@version.rating)
assert_equal("q", @version.rating)
assert_equal("", @version.source)
assert_nil(@version.parent_id)
end

View File

@@ -60,19 +60,37 @@ class TagImplicationTest < ActiveSupport::TestCase
assert_equal("ddd", ti2.descendant_names)
end
should "update the decendants for its parent on save" do
should "update the decendants for its parent on create" do
ti1 = FactoryGirl.create(:tag_implication, :antecedent_name => "aaa", :consequent_name => "bbb")
ti1.reload
assert_equal("active", ti1.status)
assert_equal("bbb", ti1.descendant_names)
ti2 = FactoryGirl.create(:tag_implication, :antecedent_name => "bbb", :consequent_name => "ccc")
ti1.reload
ti2.reload
assert_equal("active", ti1.status)
assert_equal("active", ti2.status)
assert_equal("bbb ccc", ti1.descendant_names)
assert_equal("ccc", ti2.descendant_names)
ti3 = FactoryGirl.create(:tag_implication, :antecedent_name => "ccc", :consequent_name => "ddd")
ti1.reload
ti2.reload
ti3.reload
assert_equal("bbb ccc ddd", ti1.descendant_names)
assert_equal("ccc ddd", ti2.descendant_names)
ti4 = FactoryGirl.create(:tag_implication, :antecedent_name => "ccc", :consequent_name => "eee")
ti1.reload
ti2.reload
ti3.reload
ti4.reload
assert_equal("bbb ccc eee ddd", ti1.descendant_names)
assert_equal("ccc eee ddd", ti2.descendant_names)
assert_equal("bbb ccc ddd eee", ti1.descendant_names)
assert_equal("ccc ddd eee", ti2.descendant_names)
assert_equal("ddd", ti3.descendant_names)
assert_equal("eee", ti4.descendant_names)
end
should "update any affected post upon save" do