Fix hash styles for stub_request
This commit is contained in:
parent
7865a30fec
commit
9fc8c63cae
1 changed files with 8 additions and 8 deletions
|
|
@ -5,8 +5,8 @@ describe Api::OpenidConnect::ClientsController, type: :controller do
|
|||
context "when valid parameters are passed" do
|
||||
it "should return a client id" do
|
||||
stub_request(:get, "http://example.com/uris")
|
||||
.with(headers: {Accept: "*/*", :"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
||||
:"User-Agent" => "Faraday v0.9.1"})
|
||||
.with(headers: {"Accept" => "*/*", "Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
||||
"User-Agent" => "Faraday v0.9.1"})
|
||||
.to_return(status: 200, body: "[\"http://localhost\"]", headers: {})
|
||||
post :create, redirect_uris: ["http://localhost"], client_name: "diaspora client",
|
||||
response_types: [], grant_types: [], application_type: "web", contacts: [],
|
||||
|
|
@ -22,8 +22,8 @@ describe Api::OpenidConnect::ClientsController, type: :controller do
|
|||
context "when valid parameters with jwks is passed" do
|
||||
it "should return a client id" do
|
||||
stub_request(:get, "http://example.com/uris")
|
||||
.with(headers: {Accept: "*/*", :"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
||||
:"User-Agent" => "Faraday v0.9.1"})
|
||||
.with(headers: {"Accept" => "*/*", "Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
||||
"User-Agent" => "Faraday v0.9.1"})
|
||||
.to_return(status: 200, body: "[\"http://localhost\"]", headers: {})
|
||||
post :create, redirect_uris: ["http://localhost"], client_name: "diaspora client",
|
||||
response_types: [], grant_types: [], application_type: "web", contacts: [],
|
||||
|
|
@ -80,12 +80,12 @@ describe Api::OpenidConnect::ClientsController, type: :controller do
|
|||
context "when valid parameters with jwks_uri is passed" do
|
||||
it "should return a client id" do
|
||||
stub_request(:get, "http://example.com/uris")
|
||||
.with(headers: {Accept: "*/*", :"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
||||
:"User-Agent" => "Faraday v0.9.1"})
|
||||
.with(headers: {"Accept" => "*/*", "Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
||||
"User-Agent" => "Faraday v0.9.1"})
|
||||
.to_return(status: 200, body: "[\"http://localhost\"]", headers: {})
|
||||
stub_request(:get, "https://kentshikama.com/api/openid_connect/jwks.json")
|
||||
.with(headers: {Accept: "*/*", :"Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
||||
:"User-Agent" => "Faraday v0.9.1"})
|
||||
.with(headers: {"Accept" => "*/*", "Accept-Encoding" => "gzip;q=1.0,deflate;q=0.6,identity;q=0.3",
|
||||
"User-Agent" => "Faraday v0.9.1"})
|
||||
.to_return(status: 200,
|
||||
body: "{\"keys\":[{\"kty\":\"RSA\",\"e\":\"AQAB\",\"n\":\"qpW\",\"use\":\"sig\"}]}", headers: {})
|
||||
post :create, redirect_uris: ["http://localhost"], client_name: "diaspora client",
|
||||
|
|
|
|||
Loading…
Reference in a new issue