diff options
author | Corey Hulen <corey@hulen.com> | 2017-07-28 09:32:37 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-07-28 09:32:37 -0600 |
commit | 571e4f2ae10d06addd0868f1ac474cc2055fbcb6 (patch) | |
tree | 8bc827b7369007204e995950c42f840024da30a8 /model/compliance_post_test.go | |
parent | 2d43e9975762b3bd4e6ede6c4db1e16ac661ab87 (diff) | |
download | chat-571e4f2ae10d06addd0868f1ac474cc2055fbcb6.tar.gz chat-571e4f2ae10d06addd0868f1ac474cc2055fbcb6.tar.bz2 chat-571e4f2ae10d06addd0868f1ac474cc2055fbcb6.zip |
Fixing issue with compliance export encoding (#7042)
Diffstat (limited to 'model/compliance_post_test.go')
-rw-r--r-- | model/compliance_post_test.go | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/model/compliance_post_test.go b/model/compliance_post_test.go index 4866b2494..ff159ef1b 100644 --- a/model/compliance_post_test.go +++ b/model/compliance_post_test.go @@ -25,3 +25,26 @@ func TestCompliancePost(t *testing.T) { t.Fatal() } } + +var cleanTests = []struct { + in string + expected string +}{ + {"hello", "hello"}, + {"=hello", "'=hello"}, + {"+hello", "'+hello"}, + {"-hello", "'-hello"}, + {" =hello", "' =hello"}, + {" +hello", "' +hello"}, + {" -hello", "' -hello"}, + {"\t -hello", "'\t -hello"}, +} + +func TestCleanComplianceStrings(t *testing.T) { + for _, tt := range cleanTests { + actual := cleanComplianceStrings(tt.in) + if actual != tt.expected { + t.Errorf("cleanComplianceStrings(%v): expected %v, actual %v", tt.in, tt.expected, actual) + } + } +} |