Sha256: c3feece0d89ff6cae801ed6cf36179328678da1f7a7638d996bcf404e3971ff1
Contents?: true
Size: 980 Bytes
Versions: 64
Compression:
Stored size: 980 Bytes
Contents
require "spec_helper" describe Brightbox::BBConfig do let(:expected_token) { random_token } before do @config = config_from_contents(contents) end describe "#refresh_token" do context "when value has been set" do let(:contents) { "" } it "returns set value" do @config.refresh_token = expected_token expect(@config.refresh_token).to eql(expected_token) end end context "when cached value exists" do let(:contents) do <<-EOS [app-12345] client_id = app-12345 EOS end it "returns value from config" do cache_refresh_token(@config, expected_token) expect(@config.refresh_token).to eql(expected_token) end end context "when cache files does not exist" do let(:contents) do <<-EOS [app-12345] EOS end it "returns nil" do expect(@config.refresh_token).to be_nil end end end end
Version data entries
64 entries across 64 versions & 1 rubygems