Sha256: a833589057aff46786f618f0cfe06de131916b9c6ce28e5e7eabe6c056ec6c84
Contents?: true
Size: 1.02 KB
Versions: 5
Compression:
Stored size: 1.02 KB
Contents
# frozen_string_literal: true require "spec_helper" RSpec.describe Doorkeeper::OAuth::CodeResponse do describe "#redirect_uri" do context "when generating the redirect URI for an implicit grant" do subject { described_class.new(pre_auth, auth, response_on_fragment: true).redirect_uri } let :pre_auth do double( :pre_auth, client: double(:application, id: 1), redirect_uri: "http://tst.com/cb", state: nil, scopes: Doorkeeper::OAuth::Scopes.from_string("public"), ) end let :owner do FactoryBot.create(:resource_owner) end let :auth do Doorkeeper::OAuth::Authorization::Token.new(pre_auth, owner).tap do |c| c.issue_token! allow(c.token).to receive(:expires_in_seconds).and_return(3600) end end it "includes the remaining TTL of the token relative to the time the token was generated" do expect(subject).to include("expires_in=3600") end end end end
Version data entries
5 entries across 5 versions & 2 rubygems