Sha256: 570d94f6b537a6886206444f80ee59858e8ac4eb4026c160df036853ca00f51c
Contents?: true
Size: 633 Bytes
Versions: 46
Compression:
Stored size: 633 Bytes
Contents
require 'test_helper' module Shipit module Api class BaseControllerTest < ActionController::TestCase 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
46 entries across 46 versions & 1 rubygems