Sha256: 0f2cf9ff36c5d11ee4276629eb1815d87e1450fc83982dc80d4407ed90366797
Contents?: true
Size: 900 Bytes
Versions: 18
Compression:
Stored size: 900 Bytes
Contents
require "test/setup" class AdminUiTest < Test::Unit::TestCase context "/" do setup { get "/oauth/admin" } should "return OK" do assert_equal 200, last_response.status end should "return HTML page" do assert_match "<html>", last_response.body end end context "force SSL" do setup { Server::Admin.force_ssl = true } context "HTTP request" do setup { get "/oauth/admin" } should "redirect to HTTPS" do assert_equal 302, last_response.status assert_equal "https://example.org/oauth/admin", last_response.location end end context "HTTPS request" do setup { get "https://example.org/oauth/admin" } should "serve request" do assert_equal 200, last_response.status assert_match "<html>", last_response.body end end teardown { Server::Admin.force_ssl = false } end end
Version data entries
18 entries across 18 versions & 2 rubygems