From 76604d8f9008dd4e42500a6febd09475483d4057 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Fri, 25 Nov 2016 16:02:10 +0800 Subject: [PATCH] fixed test build error --- models/repo_test.go | 12 ++++++------ modules/markdown/markdown_test.go | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/models/repo_test.go b/models/repo_test.go index fdf3a07ba..70ad1c1f0 100644 --- a/models/repo_test.go +++ b/models/repo_test.go @@ -24,7 +24,7 @@ func TestRepo(t *testing.T) { Convey("It should be nil even if other settings are present", func() { repo.EnableExternalTracker = false repo.ExternalTrackerFormat = "http://someurl.com/{user}/{repo}/{issue}" - repo.ExternalTrackerStyle = markdown.ISSUE_NAME_STYLE_NUMERIC + repo.ExternalTrackerStyle = markdown.IssueNameStyleNumeric So(repo.ComposeMetas(), ShouldEqual, map[string]string(nil)) }) }) @@ -33,17 +33,17 @@ func TestRepo(t *testing.T) { repo.EnableExternalTracker = true Convey("It should default to numeric issue style", func() { metas := repo.ComposeMetas() - So(metas["style"], ShouldEqual, markdown.ISSUE_NAME_STYLE_NUMERIC) + So(metas["style"], ShouldEqual, markdown.IssueNameStyleNumeric) }) Convey("It should pass through numeric issue style setting", func() { - repo.ExternalTrackerStyle = markdown.ISSUE_NAME_STYLE_NUMERIC + repo.ExternalTrackerStyle = markdown.IssueNameStyleNumeric metas := repo.ComposeMetas() - So(metas["style"], ShouldEqual, markdown.ISSUE_NAME_STYLE_NUMERIC) + So(metas["style"], ShouldEqual, markdown.IssueNameStyleNumeric) }) Convey("It should pass through alphanumeric issue style setting", func() { - repo.ExternalTrackerStyle = markdown.ISSUE_NAME_STYLE_ALPHANUMERIC + repo.ExternalTrackerStyle = markdown.IssueNameStyleAlphanumeric metas := repo.ComposeMetas() - So(metas["style"], ShouldEqual, markdown.ISSUE_NAME_STYLE_ALPHANUMERIC) + So(metas["style"], ShouldEqual, markdown.IssueNameStyleAlphanumeric) }) Convey("It should contain the user name", func() { metas := repo.ComposeMetas() diff --git a/modules/markdown/markdown_test.go b/modules/markdown/markdown_test.go index 9a7bc25fa..3fc260bf1 100644 --- a/modules/markdown/markdown_test.go +++ b/modules/markdown/markdown_test.go @@ -95,7 +95,7 @@ func TestMarkdown(t *testing.T) { metas["format"] = "https://someurl.com/{user}/{repo}/{index}" metas["user"] = "someuser" metas["repo"] = "somerepo" - metas["style"] = ISSUE_NAME_STYLE_NUMERIC + metas["style"] = IssueNameStyleNumeric Convey("should not render anything when there are no mentions", func() { testCases := []string{ @@ -167,7 +167,7 @@ func TestMarkdown(t *testing.T) { metas["format"] = "https://someurl.com/{user}/{repo}/?b={index}" metas["user"] = "someuser" metas["repo"] = "somerepo" - metas["style"] = ISSUE_NAME_STYLE_ALPHANUMERIC + metas["style"] = IssueNameStyleAlphanumeric Convey("It should not render anything when there are no mentions", func() { testCases := []string{ "",