This commit is contained in:
Mitchell Hashimoto 2014-04-11 09:56:18 -07:00
parent 9d728a8e99
commit 3aad85fa30
2 changed files with 3 additions and 2 deletions

View File

@ -70,7 +70,8 @@ module Vagrant
# Call the hook to transform URLs into authenticated URLs.
# In the case we don't have a plugin that does this, then it
# will just return the same URLs.
hook_env = env[:hook].call(:authenticate_box_url, box_urls: url.dup)
hook_env = env[:hook].call(
:authenticate_box_url, box_urls: url.dup)
authed_urls = hook_env[:box_urls]
if !authed_urls || authed_urls.length != url.length
raise "Bad box authentication hook, did not generate proper results."

View File

@ -354,7 +354,7 @@ describe Vagrant::Action::Builtin::BoxAdd do
expect(name).to eq("foo/bar")
expect(version).to eq("0.7")
expect(checksum(path)).to eq(checksum(box_path))
expect(opts[:metadata_url]).to eq(env[:box_url])
expect(opts[:metadata_url]).to eq("foo")
true
}.and_return(box)