Sha256: 097c87b0c3e2c90c6bffa5e1411103453981ee6a6dec4c4b896ffd2853ab2cf4
Contents?: true
Size: 895 Bytes
Versions: 62
Compression:
Stored size: 895 Bytes
Contents
require_relative "../../../spec_helper" require 'kontena/cli/cloud/logout_command' describe Kontena::Cli::Cloud::LogoutCommand do include ClientHelpers let(:account) do spy end let(:subject) do described_class.new(File.basename($0)) end describe '#logout' do before(:each) do allow(Kontena::Cli::Config.instance).to receive(:accounts).and_return([account]) end it 'reads accounts from config' do expect(Kontena::Cli::Config.instance).to receive(:accounts).and_return([account]) subject.run([]) end it 'invalidates refresh_token' do expect(subject).to receive(:use_refresh_token).with(account) subject.run([]) end it 'writes config file' do allow(subject).to receive(:use_refresh_token).with(account) expect(Kontena::Cli::Config.instance).to receive(:write) subject.run([]) end end end
Version data entries
62 entries across 62 versions & 1 rubygems