From 52aade232df8c392cb3c8cd7d3220fd392274130 Mon Sep 17 00:00:00 2001 From: Unknwon Date: Fri, 31 Mar 2017 18:28:08 -0400 Subject: [PATCH] modes: fix test compile error --- models/repo_test.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/models/repo_test.go b/models/repo_test.go index 653a0962d..2da5d8398 100644 --- a/models/repo_test.go +++ b/models/repo_test.go @@ -1,10 +1,11 @@ package models_test import ( - . "github.com/gogits/gogs/models" - . "github.com/smartystreets/goconvey/convey" "testing" + . "github.com/smartystreets/goconvey/convey" + + . "github.com/gogits/gogs/models" "github.com/gogits/gogs/modules/markup" ) @@ -24,7 +25,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 = markup.ISSUE_NAME_STYLE_NUMERIC So(repo.ComposeMetas(), ShouldEqual, map[string]string(nil)) }) }) @@ -33,17 +34,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, markup.ISSUE_NAME_STYLE_NUMERIC) }) Convey("It should pass through numeric issue style setting", func() { - repo.ExternalTrackerStyle = markdown.ISSUE_NAME_STYLE_NUMERIC + repo.ExternalTrackerStyle = markup.ISSUE_NAME_STYLE_NUMERIC metas := repo.ComposeMetas() - So(metas["style"], ShouldEqual, markdown.ISSUE_NAME_STYLE_NUMERIC) + So(metas["style"], ShouldEqual, markup.ISSUE_NAME_STYLE_NUMERIC) }) Convey("It should pass through alphanumeric issue style setting", func() { - repo.ExternalTrackerStyle = markdown.ISSUE_NAME_STYLE_ALPHANUMERIC + repo.ExternalTrackerStyle = markup.ISSUE_NAME_STYLE_ALPHANUMERIC metas := repo.ComposeMetas() - So(metas["style"], ShouldEqual, markdown.ISSUE_NAME_STYLE_ALPHANUMERIC) + So(metas["style"], ShouldEqual, markup.ISSUE_NAME_STYLE_ALPHANUMERIC) }) Convey("It should contain the user name", func() { metas := repo.ComposeMetas()