Sha256: e7b89ca0b1c9123e183f45017dc6e4f025e8e0275e03587563179f752db146d2

Contents?: true

Size: 820 Bytes

Versions: 10

Compression:

Stored size: 820 Bytes

Contents

require 'test_helper'
require 'faker/name'

class ManagersControllerTest < ActionController::TestCase
  setup do
    @manager = create(:manager)
    @manageable = @manager.managable
  end

  test "should get show" do
    get :show, id: @manager, product_id: @manageable
    assert_response :success
  end

  test "should get new" do
    get :new, product_id: @manageable
    assert_response :success
  end

  test "should get edit" do
    get :edit, id: @manager, product_id: @manageable
    assert_response :success
  end

  test "should create" do
    post :create, manager: {firstname: 'Hello'}, product_id: @manageable
    assert_response 302
  end

  test "should update" do
    patch :update, id: @manager, manager: {name: 'Hello'}, product_id: @manageable
    assert_redirected_to product_manager_path
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
iord-1.2.2 test/controllers/manager_controller_test.rb
iord-1.2.1 test/controllers/manager_controller_test.rb
iord-1.2.0 test/controllers/manager_controller_test.rb
iord-1.1.3 test/controllers/manager_controller_test.rb
iord-1.1.2 test/controllers/manager_controller_test.rb
iord-1.1.1 test/controllers/manager_controller_test.rb
iord-1.1.0 test/controllers/manager_controller_test.rb
iord-1.0.3 test/controllers/manager_controller_test.rb
iord-1.0.2 test/controllers/manager_controller_test.rb
iord-1.0.1 test/controllers/manager_controller_test.rb