mirror of
https://github.com/opentofu/opentofu.git
synced 2024-12-25 16:31:10 -06:00
27 lines
438 B
Go
27 lines
438 B
Go
package terraform
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestPrefixUIInput_impl(t *testing.T) {
|
|
var _ UIInput = new(PrefixUIInput)
|
|
}
|
|
|
|
func testPrefixUIInput(t *testing.T) {
|
|
input := new(MockUIInput)
|
|
prefix := &PrefixUIInput{
|
|
IdPrefix: "foo",
|
|
UIInput: input,
|
|
}
|
|
|
|
_, err := prefix.Input(&InputOpts{Id: "bar"})
|
|
if err != nil {
|
|
t.Fatalf("err: %s", err)
|
|
}
|
|
|
|
if input.InputOpts.Id != "foo.bar" {
|
|
t.Fatalf("bad: %#v", input.InputOpts)
|
|
}
|
|
}
|