Commit 88c83a71bb4d75d0b83947d6c08054a069f2ace8
1 parent
2f20d835
Exists in
master
and in
1 other branch
Added test for updated github_url_to_file
Showing
1 changed file
with
5 additions
and
0 deletions
Show diff stats
spec/models/app_spec.rb
@@ -98,6 +98,11 @@ describe App do | @@ -98,6 +98,11 @@ describe App do | ||
98 | app = Fabricate(:app, :github_repo => "errbit/errbit") | 98 | app = Fabricate(:app, :github_repo => "errbit/errbit") |
99 | app.github_url_to_file('/path/to/file').should == "https://github.com/errbit/errbit/blob/master/path/to/file" | 99 | app.github_url_to_file('/path/to/file').should == "https://github.com/errbit/errbit/blob/master/path/to/file" |
100 | end | 100 | end |
101 | + | ||
102 | + it 'resolves to full path to file without leading root symbol' do | ||
103 | + app = Fabricate(:app, :github_repo => "errbit/errbit") | ||
104 | + app.github_url_to_file('path/to/file').should == "https://github.com/errbit/errbit/blob/master/path/to/file" | ||
105 | + end | ||
101 | end | 106 | end |
102 | 107 | ||
103 | context '#github_repo?' do | 108 | context '#github_repo?' do |