Files
fn-serverless/vendor/github.com/fsouza/go-dockerclient/change_test.go
Reed Allman 30f3c45dbc update vendor/ dir to latest w/o heroku, moby
had to lock a lot of things in place
2017-08-03 03:52:14 -07:00

26 lines
697 B
Go

// Copyright 2014 go-dockerclient authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package docker
import "testing"
func TestChangeString(t *testing.T) {
t.Parallel()
var tests = []struct {
change Change
expected string
}{
{Change{"/etc/passwd", ChangeModify}, "C /etc/passwd"},
{Change{"/etc/passwd", ChangeAdd}, "A /etc/passwd"},
{Change{"/etc/passwd", ChangeDelete}, "D /etc/passwd"},
{Change{"/etc/passwd", 33}, " /etc/passwd"},
}
for _, tt := range tests {
if got := tt.change.String(); got != tt.expected {
t.Errorf("Change.String(): want %q. Got %q.", tt.expected, got)
}
}
}