Sha256: d1492c49f934bd214fb1837baf97ea648168b35d47a83e0aa723972d492637ed
Contents?: true
Size: 637 Bytes
Versions: 14
Compression:
Stored size: 637 Bytes
Contents
require 'spec_helper' RSpec.describe RDStation::Authorization do describe ".initialize" do context "when access_token is nil" do it "raises an error" do expect do described_class.new(access_token: nil) end.to raise_error(ArgumentError) end end end describe "#headers" do let(:access_token) { 'access_token' } it "generates the correct header" do header = described_class.new(access_token: access_token).headers expect(header['Authorization']).to eq "Bearer #{access_token}" expect(header['Content-Type']).to eq "application/json" end end end
Version data entries
14 entries across 14 versions & 1 rubygems