Sha256: b270df10e383318f682403b73570fa8f0b9ed8110e11a9bc5efd88fa66fa73bf

Contents?: true

Size: 730 Bytes

Versions: 10

Compression:

Stored size: 730 Bytes

Contents

require 'test_helper'
require 'faker/name'

class AdministratorsControllerTest < ActionController::TestCase
  setup do
    @admin = create(:administrator)
  end

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

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

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

  test "should create" do
    assert_difference('Administrator.count') do
      post :create, administrator: {firstname: 'Hello'}
    end
    assert_response 302
  end

  test "should update" do
    patch :update, id: @admin, administrator: {name: 'Hello'}
    assert_redirected_to administrator_path
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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