Sha256: ee610a954455421ca3eb8cadcd9222eb8eabeccc7e47d42a12232b449dd3306d
Contents?: true
Size: 610 Bytes
Versions: 9
Compression:
Stored size: 610 Bytes
Contents
require 'test_helper' class MetadataControllerTest < ActionController::TestCase tests Maestrano::Rails::MetadataController context "unauthenticated" do should "deny access" do get :index assert_equal '401', response.code end end context "authenticated" do setup do @request.env["HTTP_AUTHORIZATION"] = "Basic " + Base64.encode64("#{Maestrano.param('api.id')}:#{Maestrano.param('api.key')}") end should "be successful" do get :index assert_equal '200', response.code assert_equal Maestrano.to_metadata.to_json, response.body end end end
Version data entries
9 entries across 9 versions & 1 rubygems