Sha256: 4081275935f45f6b7619f5079b9de6549b0ec17006529f830c38fe7dd9461dae

Contents?: true

Size: 807 Bytes

Versions: 10

Compression:

Stored size: 807 Bytes

Contents

require 'test_helper'
require 'faker/name'

module Admin
  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 admin_administrator_path
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

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