Sha256: 21f0cb3e8f0c3ff7081f85e31725236e85c0272fc4d90b1eff4fd96ee75de70b
Contents?: true
Size: 537 Bytes
Versions: 22
Compression:
Stored size: 537 Bytes
Contents
require 'test_helper' class Api::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
Version data entries
22 entries across 22 versions & 1 rubygems