diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-17 16:58:15 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-10-17 16:58:15 +0400 |
commit | ec337276c620929867635eb704d2a076bf02ae40 (patch) | |
tree | 7e7d4bee0720a9f45f5f030e98d13024ed67124c /spec | |
parent | fd39c80f8b4a7c98e0da62bf7e7f29ee192887ca (diff) | |
parent | 52739518bc8c01f0c9821b01ce5bc3bcd92f2159 (diff) |
Merge branch 'issue_tracker' of /home/git/repositories/gitlab/gitlabhq
Diffstat (limited to 'spec')
-rw-r--r-- | spec/helpers/issues_helper_spec.rb | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/spec/helpers/issues_helper_spec.rb b/spec/helpers/issues_helper_spec.rb index 3595af32431..9c95bc044f3 100644 --- a/spec/helpers/issues_helper_spec.rb +++ b/spec/helpers/issues_helper_spec.rb @@ -47,6 +47,17 @@ describe IssuesHelper do url_for_project_issues.should eq "" end + + describe "when external tracker was enabled and then config removed" do + before do + @project = ext_project + Gitlab.config.stub(:issues_tracker).and_return(nil) + end + + it "should return path to internal tracker" do + url_for_project_issues.should match(polymorphic_path([@project])) + end + end end describe :url_for_issue do @@ -75,6 +86,17 @@ describe IssuesHelper do url_for_issue(issue.iid).should eq "" end + + describe "when external tracker was enabled and then config removed" do + before do + @project = ext_project + Gitlab.config.stub(:issues_tracker).and_return(nil) + end + + it "should return internal path" do + url_for_issue(issue.iid).should match(polymorphic_path([@project, issue])) + end + end end describe :url_for_new_issue do @@ -101,6 +123,17 @@ describe IssuesHelper do url_for_new_issue.should eq "" end + + describe "when external tracker was enabled and then config removed" do + before do + @project = ext_project + Gitlab.config.stub(:issues_tracker).and_return(nil) + end + + it "should return internal path" do + url_for_new_issue.should match(new_project_issue_path(@project)) + end + end end end |