Sha256: 741d7bebf20d65c306d6b275c45d20f38f36826f10ea0caad6e38107d798263f
Contents?: true
Size: 1.2 KB
Versions: 1
Compression:
Stored size: 1.2 KB
Contents
require 'test_helper' module Discussion class ThreadsControllerTest < ActionController::TestCase setup do @thread = threads(:one) end test "should get index" do get :index assert_response :success assert_not_nil assigns(:threads) end test "should get new" do get :new assert_response :success end test "should create thread" do assert_difference('Thread.count') do post :create, thread: { initiator_id: @thread.initiator_id, subject: @thread.subject } end assert_redirected_to thread_path(assigns(:thread)) end test "should show thread" do get :show, id: @thread assert_response :success end test "should get edit" do get :edit, id: @thread assert_response :success end test "should update thread" do put :update, id: @thread, thread: { initiator_id: @thread.initiator_id, subject: @thread.subject } assert_redirected_to thread_path(assigns(:thread)) end test "should destroy thread" do assert_difference('Thread.count', -1) do delete :destroy, id: @thread end assert_redirected_to threads_path end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
discussion-0.0.1 | test/functional/discussion/threads_controller_test.rb |