summaryrefslogtreecommitdiff
path: root/spec/integration
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration')
-rw-r--r--spec/integration/server_spec.rb46
1 files changed, 46 insertions, 0 deletions
diff --git a/spec/integration/server_spec.rb b/spec/integration/server_spec.rb
new file mode 100644
index 0000000..1271f05
--- /dev/null
+++ b/spec/integration/server_spec.rb
@@ -0,0 +1,46 @@
+# frozen_string_literal: true
+
+require 'spec_helper'
+
+RSpec.describe "Server" do
+ let(:base_url) { "http://#{RSpec.configuration.bind_addr}" }
+ let(:client) { Net::Hippie::Client.new }
+
+ describe "GET /" do
+ it 'returns OK' do
+ response = client.get(base_url + "/")
+ expect(response.code).to eq("200")
+ end
+ end
+
+ describe "GET /404" do
+ it 'returns 404' do
+ response = client.get(base_url + "/404")
+ expect(response.code).to eq("404")
+ end
+ end
+
+ # https://datatracker.ietf.org/doc/html/rfc8414#section-3.1
+ describe "GET /.well-known/oauth-authorization-server" do
+ it 'returns OK' do
+ response = client.get(base_url + "/.well-known/oauth-authorization-server")
+ expect(response.code).to eq("200")
+ expect(response["Content-Type"]).to eq("application/json")
+ end
+ end
+
+ # https://datatracker.ietf.org/doc/html/rfc8693#section-2.3
+ describe "POST /token" do
+ pending
+ end
+
+ # https://datatracker.ietf.org/doc/html/rfc7662#section-2
+ describe "POST /introspect" do
+ pending
+ end
+
+ # https://datatracker.ietf.org/doc/html/rfc7009#section-2.1
+ describe "POST /revoke" do
+ pending
+ end
+end