Sha256: 0c87763725452d1f1141cda3d7ae6a692417389014aca7d537bff74de873a73b
Contents?: true
Size: 662 Bytes
Versions: 2
Compression:
Stored size: 662 Bytes
Contents
# frozen_string_literal: true require 'test_helper' module Shipit module Api class BaseControllerTest < ApiControllerTestCase test "authentication is required" do get :index assert_response :unauthorized assert_equal({ message: 'Bad credentials' }.to_json, response.body) end test "with proper credentials the request is processed" do authenticate! assert_response :ok end test "#index respond with a list of endpoints" do authenticate! get :index, format: :json assert_equal({ stacks_url: api_stacks_url }.to_json, response.body) end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
shipit-engine-0.39.0 | test/controllers/api/base_controller_test.rb |
shipit-engine-0.38.0 | test/controllers/api/base_controller_test.rb |