Sha256: cd0edcfe8fc0f4f657200c07652b92b95cb3333fdf871f3cb8746d76f9caef19

Contents?: true

Size: 1.09 KB

Versions: 21

Compression:

Stored size: 1.09 KB

Contents

require 'test_helper'

module Ems
  class ChannelsControllerTest < ActionController::TestCase
    setup do
      @channel = channels(:one)
    end
  
    test "should get index" do
      get :index
      assert_response :success
      assert_not_nil assigns(:channels)
    end
  
    test "should get new" do
      get :new
      assert_response :success
    end
  
    test "should create channel" do
      assert_difference('Channel.count') do
        post :create, channel: {  }
      end
  
      assert_redirected_to channel_path(assigns(:channel))
    end
  
    test "should show channel" do
      get :show, id: @channel
      assert_response :success
    end
  
    test "should get edit" do
      get :edit, id: @channel
      assert_response :success
    end
  
    test "should update channel" do
      put :update, id: @channel, channel: {  }
      assert_redirected_to channel_path(assigns(:channel))
    end
  
    test "should destroy channel" do
      assert_difference('Channel.count', -1) do
        delete :destroy, id: @channel
      end
  
      assert_redirected_to channels_path
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
ems-0.0.2 test/functional/ems/channels_controller_test.rb