Update tests with attached method

This commit is contained in:
Duco van Amstel
2018-11-26 09:20:23 +00:00
committed by GitHub
parent d122bc8f9a
commit 8441076784

View File

@@ -20,8 +20,9 @@ func TestExtractTopicOrPurpose(t *testing.T) {
"error - unhandled": {"some unmatched message", "unknown", ""},
}
b := &Bslack{}
for name, tc := range testcases {
gotChangeType, gotOutput := extractTopicOrPurpose(tc.input)
gotChangeType, gotOutput := b.extractTopicOrPurpose(tc.input)
assert.Equalf(t, tc.wantChangeType, gotChangeType, "This testcase failed: %s", name)
assert.Equalf(t, tc.wantOutput, gotOutput, "This testcase failed: %s", name)