spec/lib/taketo/destination_resolver_spec.rb in taketo-0.1.2 vs spec/lib/taketo/destination_resolver_spec.rb in taketo-0.1.3

- old
+ new

@@ -1,9 +1,8 @@ require 'spec_helper' require 'support/helpers/construct_spec_helper' require 'taketo/destination_resolver' -require 'taketo/support/named_nodes_collection' include Taketo describe "DestinationResolver" do include ConstructsFixtures @@ -159,9 +158,13 @@ expect(resolver(config, "foo").get_node).to eq(project1) end it "returns the config if path has is empty and there's no default destination" do expect(resolver(config, "").get_node).to eq(config) + end + + it "resolves to server by global server alias" do + expect(resolver(config, "the_alias").get_node).to eq(server1) end it "raises NonExistentDestinationError when path is not correct" do expect { resolver(config, "i").get_node }.to raise_error(NonExistentDestinationError) end