Sha256: 6bac93e9ae678a7c3b1ed835e5cd786cc04c4b23c3800a4639ba0e64dcc8d7fa

Contents?: true

Size: 1.06 KB

Versions: 5

Compression:

Stored size: 1.06 KB

Contents

require 'test_helper'

class ApisControllerTest < ActionDispatch::IntegrationTest
  setup do
    @api = apis(:one)
  end

  test "should get index" do
    get apis_url
    assert_response :success
  end

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

  test "should create api" do
    assert_difference('Api.count') do
      post apis_url, params: { api: { code_id: @api.code_id, rfc: @api.rfc, rftrolling_foreign_key: @api.rftrolling_foreign_key } }
    end

    assert_redirected_to api_url(Api.last)
  end

  test "should show api" do
    get api_url(@api)
    assert_response :success
  end

  test "should get edit" do
    get edit_api_url(@api)
    assert_response :success
  end

  test "should update api" do
    patch api_url(@api), params: { api: { code_id: @api.code_id, rfc: @api.rfc, rftrolling_foreign_key: @api.rftrolling_foreign_key } }
    assert_redirected_to api_url(@api)
  end

  test "should destroy api" do
    assert_difference('Api.count', -1) do
      delete api_url(@api)
    end

    assert_redirected_to apis_url
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
jester-data-8.0.0 test/controllers/apis_controller_test.rb
ezii-os-5.2.1 test/controllers/apis_controller_test.rb
ezii-os-2.0.1 test/controllers/apis_controller_test.rb
ezii-os-1.1.0 test/controllers/apis_controller_test.rb
ezii-os-1.0.0 test/controllers/apis_controller_test.rb