Sha256: f8d79792f4f3ae2a023702a71bc6233a7c64589460090ca9acdae0f38187caef

Contents?: true

Size: 1.04 KB

Versions: 8

Compression:

Stored size: 1.04 KB

Contents

require 'test_helper'

module FlyAdmin
  class VideosControllerTest < ActionController::TestCase
    setup do
      @video = videos(:one)
    end

    test "should get index" do
      get :index
      assert_response :success
      assert_not_nil assigns(:videos)
    end

    test "should get new" do
      get :new
      assert_response :success
    end

    test "should create video" do
      assert_difference('Video.count') do
        post :create, video: {  }
      end

      assert_redirected_to video_path(assigns(:video))
    end

    test "should show video" do
      get :show, id: @video
      assert_response :success
    end

    test "should get edit" do
      get :edit, id: @video
      assert_response :success
    end

    test "should update video" do
      patch :update, id: @video, video: {  }
      assert_redirected_to video_path(assigns(:video))
    end

    test "should destroy video" do
      assert_difference('Video.count', -1) do
        delete :destroy, id: @video
      end

      assert_redirected_to videos_path
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
fly_admin-0.0.8 test/controllers/fly_admin/videos_controller_test.rb
fly_admin-0.0.7 test/controllers/fly_admin/videos_controller_test.rb
fly_admin-0.0.6 test/controllers/fly_admin/videos_controller_test.rb
fly_admin-0.0.5 test/controllers/fly_admin/videos_controller_test.rb
fly_admin-0.0.4 test/controllers/fly_admin/videos_controller_test.rb
fly_admin-0.0.3 test/controllers/fly_admin/videos_controller_test.rb
fly_admin-0.0.2 test/controllers/fly_admin/videos_controller_test.rb
fly_admin-0.0.1 test/controllers/fly_admin/videos_controller_test.rb