Blob Blame History Raw
From 60214f4f66ef4fb864aa535c6dccfe5a8b197de8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?V=C3=ADt=20Ondruch?= <vondruch@redhat.com>
Date: Tue, 26 Feb 2019 12:17:44 +0100
Subject: [PATCH] Fix fake_ftp 0.3.x compatibility.

fake_ftp introduced support direcotry support, which changes the
behavior:

https://github.com/livinginthepast/fake_ftp/pull/42
---
 test/unit/plugins/pushes/ftp/adapter_test.rb | 4 ++--
 test/unit/plugins/pushes/ftp/push_test.rb    | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/test/unit/plugins/pushes/ftp/adapter_test.rb b/test/unit/plugins/pushes/ftp/adapter_test.rb
index 93888f840..a92cc7422 100644
--- a/test/unit/plugins/pushes/ftp/adapter_test.rb
+++ b/test/unit/plugins/pushes/ftp/adapter_test.rb
@@ -77,7 +77,7 @@ describe VagrantPlugins::FTPPush::FTPAdapter do
         ftp.upload("#{@dir}/file", "/file")
       end
 
-      expect(server.files).to include("file")
+      expect(server.files).to include("/file")
     end
 
     it "uploads in passive mode" do
@@ -86,7 +86,7 @@ describe VagrantPlugins::FTPPush::FTPAdapter do
         ftp.upload("#{@dir}/file", "/file")
       end
 
-      expect(server.file("file")).to be_passive
+      expect(server.file("/file")).to be_passive
     end
   end
 end
diff --git a/test/unit/plugins/pushes/ftp/push_test.rb b/test/unit/plugins/pushes/ftp/push_test.rb
index 83509fb7d..49c08da6f 100644
--- a/test/unit/plugins/pushes/ftp/push_test.rb
+++ b/test/unit/plugins/pushes/ftp/push_test.rb
@@ -71,7 +71,7 @@ describe VagrantPlugins::FTPPush::Push do
 
     it "pushes the files to the server" do
       subject.push
-      expect(server.files).to eq(%w(Gemfile data.txt))
+      expect(server.files).to eq(%w(/var/www/site/Gemfile /var/www/site/data.txt))
     end
 
     it "raises informative exception when too many files to process" do
-- 
2.20.1