summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_helper.rb4
-rw-r--r--test/unit/config_object_list_test.rb2
-rw-r--r--test/unit/config_object_test.rb2
3 files changed, 6 insertions, 2 deletions
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 94bb2b4..c75222b 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -21,6 +21,10 @@ class MiniTest::Unit::TestCase
end
end
+ def provider
+ manager.provider
+ end
+
def base_path
File.expand_path '../..', __FILE__
end
diff --git a/test/unit/config_object_list_test.rb b/test/unit/config_object_list_test.rb
index a507094..ecb6d4e 100644
--- a/test/unit/config_object_list_test.rb
+++ b/test/unit/config_object_list_test.rb
@@ -9,7 +9,7 @@ class ConfigObjectListTest < MiniTest::Unit::TestCase
end
def test_complex_node_search
- domain = manager.provider.domain
+ domain = provider.domain
nodes = manager.nodes['dns.public' => true]
expected = [{"domain_full"=>"ns1.#{domain}"}, {"domain_full"=>"ns2.#{domain}"}, {"domain_full"=>"vpn1.#{domain}"}, {"domain_full"=>"web1.#{domain}"}]
assert_equal expected.size, nodes.size
diff --git a/test/unit/config_object_test.rb b/test/unit/config_object_test.rb
index b981f3b..79cf596 100644
--- a/test/unit/config_object_test.rb
+++ b/test/unit/config_object_test.rb
@@ -3,7 +3,7 @@ require File.expand_path('test_helper', File.dirname(__FILE__))
class ConfigObjectTest < MiniTest::Unit::TestCase
def test_bracket_lookup
- domain = manager.provider.domain
+ domain = provider.domain
vpn1 = manager.nodes['vpn1']
assert_equal "vpn1.#{domain}", vpn1['domain.full']
end