pulumi/cmd/config_test.go
Pat Gavlin a23b10a9bf
Update the copyright end date to 2018. (#1068)
Just what it says on the tin.
2018-03-21 12:43:21 -07:00

21 lines
612 B
Go

// Copyright 2016-2018, Pulumi Corporation. All rights reserved.
package cmd
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/pulumi/pulumi/pkg/resource/config"
"github.com/pulumi/pulumi/pkg/tokens"
"github.com/pulumi/pulumi/pkg/workspace"
)
func TestPrettyKeyForProject(t *testing.T) {
proj := &workspace.Project{Name: tokens.PackageName("test-package"), Runtime: "nodejs"}
assert.Equal(t, "foo", prettyKeyForProject(config.MustMakeKey("test-package", "foo"), proj))
assert.Equal(t, "other-package:bar", prettyKeyForProject(config.MustMakeKey("other-package", "bar"), proj))
}