summaryrefslogtreecommitdiff
path: root/spec/functions
diff options
context:
space:
mode:
authorBryan Jen <bryan.jen@gmail.com>2016-12-13 08:43:03 -0700
committerGitHub <noreply@github.com>2016-12-13 08:43:03 -0700
commitd4bd66c477f0f3e9cc45aea6bf185f02b91b0973 (patch)
tree0df762b7db25c62440b0093dc1edfc9a4e2dc302 /spec/functions
parentf63644a0385f5f27f4285b91ea6e367a515fdfc2 (diff)
parent0e684d82ea1ad0f5c85b8aa0147ffec39aac8ddd (diff)
Merge pull request #700 from petems/MODULES-4188-uuid_function
(MODULES-4188) Add UUID generation function
Diffstat (limited to 'spec/functions')
-rw-r--r--spec/functions/fqdn_uuid_spec.rb14
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/functions/fqdn_uuid_spec.rb b/spec/functions/fqdn_uuid_spec.rb
new file mode 100644
index 0000000..a2d1618
--- /dev/null
+++ b/spec/functions/fqdn_uuid_spec.rb
@@ -0,0 +1,14 @@
+require 'spec_helper'
+
+describe 'fqdn_uuid' do
+
+ context "Invalid parameters" do
+ it { should run.with_params().and_raise_error(ArgumentError, /No arguments given$/) }
+ end
+
+ context "given string" do
+ it { should run.with_params('puppetlabs.com').and_return('9c70320f-6815-5fc5-ab0f-debe68bf764c') }
+ it { should run.with_params('google.com').and_return('64ee70a4-8cc1-5d25-abf2-dea6c79a09c8') }
+ end
+
+end