From 5c871aee643ecac237719446e4d1fc47bf1a6a49 Mon Sep 17 00:00:00 2001 From: evazion Date: Mon, 6 Feb 2017 02:01:39 -0600 Subject: [PATCH] tests: add more pools controller tests. --- test/functional/pools_controller_test.rb | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/test/functional/pools_controller_test.rb b/test/functional/pools_controller_test.rb index a56aaa9a2..12b6220db 100644 --- a/test/functional/pools_controller_test.rb +++ b/test/functional/pools_controller_test.rb @@ -49,6 +49,21 @@ class PoolsControllerTest < ActionController::TestCase end end + context "gallery action" do + should "render" do + pool = FactoryGirl.create(:pool) + get :gallery, {:id => pool.id} + assert_response :success + end + end + + context "new action" do + should "render" do + get :new, {}, { user_id: @user.id } + assert_response :success + end + end + context "create action" do should "create a pool" do assert_difference("Pool.count", 1) do @@ -57,6 +72,15 @@ class PoolsControllerTest < ActionController::TestCase end end + context "edit action" do + should "render" do + pool = FactoryGirl.create(:pool) + + get :edit, { id: pool.id }, { user_id: @user.id } + assert_response :success + end + end + context "update action" do setup do @pool = FactoryGirl.create(:pool)