From 4fb3b1aea0b03557bcfcefd3adedbbeae5f0f61b Mon Sep 17 00:00:00 2001 From: Alexey Terentyev Date: Tue, 19 Jun 2018 17:57:53 +0300 Subject: [PATCH] Fixed test for changed regexp Signed-off-by: Alexey Terentyev --- models/topic_test.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/models/topic_test.go b/models/topic_test.go index 93137fd72..d537e1aee 100644 --- a/models/topic_test.go +++ b/models/topic_test.go @@ -57,11 +57,11 @@ func TestAddTopic(t *testing.T) { } func TestTopicValidator(t *testing.T) { - assert.True(t, TopicValidator("first-topic")) - assert.True(t, TopicValidator("#second-test_topic")) - assert.True(t, TopicValidator("third+project+topic.with+max_length")) + assert.True(t, TopicValidator("first")) + assert.True(t, TopicValidator("second-test-topic")) + assert.True(t, TopicValidator("third-project-topic-with-max-length")) - assert.False(t, TopicValidator("$fourth-topic")) - assert.False(t, TopicValidator("#fifth,test;topic")) - assert.False(t, TopicValidator("#sixth-go+project.topic+with+excess_length")) + assert.False(t, TopicValidator("$fourth-test,topic")) + assert.False(t, TopicValidator("-fifth-test-topic")) + assert.False(t, TopicValidator("sixth-go-project-topic-with-excess-length")) }