From 88c83a71bb4d75d0b83947d6c08054a069f2ace8 Mon Sep 17 00:00:00 2001 From: Sergey Kuznetsov Date: Fri, 9 Nov 2012 17:47:28 +0400 Subject: [PATCH] Added test for updated github_url_to_file --- spec/models/app_spec.rb | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/spec/models/app_spec.rb b/spec/models/app_spec.rb index 76f7933..2357ce1 100644 --- a/spec/models/app_spec.rb +++ b/spec/models/app_spec.rb @@ -98,6 +98,11 @@ describe App do app = Fabricate(:app, :github_repo => "errbit/errbit") app.github_url_to_file('/path/to/file').should == "https://github.com/errbit/errbit/blob/master/path/to/file" end + + it 'resolves to full path to file without leading root symbol' do + app = Fabricate(:app, :github_repo => "errbit/errbit") + app.github_url_to_file('path/to/file').should == "https://github.com/errbit/errbit/blob/master/path/to/file" + end end context '#github_repo?' do -- libgit2 0.21.2