From 3316098bb63d1cc5b0e743c254f11c9b643df7ac Mon Sep 17 00:00:00 2001 From: Chris Roberts Date: Wed, 17 Mar 2021 13:08:30 -0700 Subject: [PATCH] White space trim --- .../add_downloader_authentication_test.rb | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/unit/plugins/commands/cloud/auth/middleware/add_downloader_authentication_test.rb b/test/unit/plugins/commands/cloud/auth/middleware/add_downloader_authentication_test.rb index 517d789c6..0ddb463de 100644 --- a/test/unit/plugins/commands/cloud/auth/middleware/add_downloader_authentication_test.rb +++ b/test/unit/plugins/commands/cloud/auth/middleware/add_downloader_authentication_test.rb @@ -53,16 +53,16 @@ describe VagrantPlugins::CloudCommand::AddDownloaderAuthentication do it "warns when adding token to custom server" do server_url = "https://surprise.com" allow(Vagrant).to receive(:server_url).and_return(server_url) - + token = "foobarbaz" VagrantPlugins::CloudCommand::Client.new(iso_env).store_token(token) - + expect(subject).to receive(:sleep).once expect(ui).to receive(:warn).once - + env[:downloader] = dwnloader subject.call(env) - + expect(env[:downloader].headers).to eq(["Authorization: Bearer #{token}"]) end end @@ -97,11 +97,11 @@ describe VagrantPlugins::CloudCommand::AddDownloaderAuthentication do let(:auth_header) { "Authorization Bearer: token" } let(:other_header) {"some: thing"} let(:dwnloader) { Vagrant::Util::Downloader.new(server_url, "/some/path", {headers: [other_header]}) } - + it "appends the auth header" do token = "foobarbaz" VagrantPlugins::CloudCommand::Client.new(iso_env).store_token(token) - + env[:downloader] = dwnloader subject.call(env) @@ -115,7 +115,7 @@ describe VagrantPlugins::CloudCommand::AddDownloaderAuthentication do it "returns original urls when not modified" do env[:downloader] = dwnloader subject.call(env) - + expect(env[:downloader].source).to eq(file_path) expect(env[:downloader].headers.empty?).to eq(true) end @@ -125,7 +125,7 @@ describe VagrantPlugins::CloudCommand::AddDownloaderAuthentication do dwnloader.headers << auth_header token = "foobarbaz" VagrantPlugins::CloudCommand::Client.new(iso_env).store_token(token) - + env[:downloader] = dwnloader subject.call(env)