Commit 6f9428b1cd66d9f4ded1f1b1ef38e258e2b97c50
1 parent
90c2cd1e
Exists in
master
and in
4 other branches
Fix GFM helper to raise an exception when @project is not set
Showing
2 changed files
with
7 additions
and
0 deletions
Show diff stats
app/helpers/application_helper.rb
spec/helpers/gitlab_flavored_markdown_spec.rb
... | ... | @@ -10,6 +10,12 @@ describe ApplicationHelper do |
10 | 10 | end |
11 | 11 | |
12 | 12 | describe "#gfm" do |
13 | + it "should raiase an error if @project is not set" do | |
14 | + @project = nil | |
15 | + | |
16 | + expect { gfm("foo") }.to raise_error | |
17 | + end | |
18 | + | |
13 | 19 | describe "referencing a commit" do |
14 | 20 | it "should link using a full id" do |
15 | 21 | gfm("Reverts changes from #{@commit.id}").should == "Reverts changes from #{link_to @commit.id, project_commit_path(@project, :id => @commit.id), :title => "Commit: #{@commit.author_name} - #{@commit.title}", :class => "gfm gfm-commit "}" | ... | ... |