summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/app_test.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/app_test.rb b/test/app_test.rb
index 4c997d7..499909d 100644
--- a/test/app_test.rb
+++ b/test/app_test.rb
@@ -65,4 +65,17 @@ class AppTest < HCl::TestCase
assert_match /API failure/i, error_output
end
+ def test_save_password_allows_passwords_with_quotes
+ app = HCl::App.new
+ app.expects(:system).with("security add-internet-password -U -l hcl -a 'taco@example.com' -s 'acme.harvestapp.com' -w pass\\ with\\ \\'\\ quote")
+
+ config = {
+ 'login' => 'taco@example.com',
+ 'subdomain' => 'acme',
+ 'password' => "pass with ' quote",
+ }
+
+ app.send :save_password, config
+ end
+
end