spec/paperclip/storage/ftp_spec.rb in paperclip-storage-ftp-1.0.2 vs spec/paperclip/storage/ftp_spec.rb in paperclip-storage-ftp-1.0.3
- old
+ new
@@ -11,16 +11,18 @@
:path => "/files/:style/:filename",
:ftp_servers => [
{
:host => "ftp1.example.com",
:user => "user1",
- :password => "password1"
+ :password => "password1",
+ :port => 2121
},
{
:host => "ftp2.example.com",
:user => "user2",
- :password => "password2"
+ :password => "password2",
+ :passive => true
}
]
})
end
@@ -124,12 +126,14 @@
context "#ftp_servers" do
it "returns the configured ftp servers" do
attachment.ftp_servers.first.host.should == "ftp1.example.com"
attachment.ftp_servers.first.user.should == "user1"
attachment.ftp_servers.first.password.should == "password1"
+ attachment.ftp_servers.first.port.should == 2121
attachment.ftp_servers.second.host.should == "ftp2.example.com"
attachment.ftp_servers.second.user.should == "user2"
attachment.ftp_servers.second.password.should == "password2"
+ attachment.ftp_servers.second.passive.should == true
end
end
context "#primary_ftp_server" do
it "returns the first server in the list" do