Sha256: 06aef81e8829e6213f20e7c6be36e1c7ce81564fdd85aaacee0443011e49d79d

Contents?: true

Size: 1014 Bytes

Versions: 2

Compression:

Stored size: 1014 Bytes

Contents

require 'test_helper'

class DigitalsControllerTest < ActionController::TestCase
  setup do
    @digital = digitals(:one)
  end

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

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

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

    assert_redirected_to digital_path(assigns(:digital))
  end

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

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

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

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

    assert_redirected_to digitals_path
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
datashift-0.40.1 spec/dummy/test/controllers/digitals_controller_test.rb
datashift-0.40.0 spec/dummy/test/controllers/digitals_controller_test.rb