fixed tag subscription tests

This commit is contained in:
albert
2011-07-20 17:23:38 -04:00
parent c453e7db0f
commit 6791d4d113
13 changed files with 99 additions and 44 deletions

View File

@@ -15,26 +15,18 @@ class TagSubscriptionsControllerTest < ActionController::TestCase
context "index action" do
setup do
@tag_subscription = Factory.create(:tag_subscription, :name => "aaa", :owner => @user)
@tag_subscription = Factory.create(:tag_subscription, :name => "aaa")
end
should "list all visible tag subscriptions" do
get :index
assert_response :success
end
context "with search conditions" do
should "list all matching forum posts" do
get :index, {:search => {:name_equals => "aaa"}}
assert_response :success
assert_equal(1, assigns(:tag_subscriptions).size)
end
end
end
context "edit action" do
setup do
@tag_subscription = Factory.create(:tag_subscription, :owner => @user)
@tag_subscription = Factory.create(:tag_subscription)
end
should "render" do