Commit f9877c529eb6864dbf4b21ef6ddd2ab48159f1b3
1 parent
34cea1cb
Exists in
master
and in
4 other branches
Update specs
Showing
1 changed file
with
5 additions
and
5 deletions
Show diff stats
spec/requests/commits_spec.rb
@@ -2,7 +2,7 @@ require 'spec_helper' | @@ -2,7 +2,7 @@ require 'spec_helper' | ||
2 | 2 | ||
3 | describe "Commits" do | 3 | describe "Commits" do |
4 | let(:project) { Factory :project } | 4 | let(:project) { Factory :project } |
5 | - let!(:commit) { project.commit } | 5 | + let!(:commit) { CommitDecorator.decorate(project.commit) } |
6 | before do | 6 | before do |
7 | login_as :user | 7 | login_as :user |
8 | project.add_access(@user, :read) | 8 | project.add_access(@user, :read) |
@@ -22,8 +22,8 @@ describe "Commits" do | @@ -22,8 +22,8 @@ describe "Commits" do | ||
22 | end | 22 | end |
23 | 23 | ||
24 | it "should list commits" do | 24 | it "should list commits" do |
25 | - page.should have_content(commit.message) | ||
26 | - page.should have_content(commit.id.to_s[0..5]) | 25 | + page.should have_content(commit.description) |
26 | + page.should have_content(commit.short_id) | ||
27 | end | 27 | end |
28 | 28 | ||
29 | it "should render atom feed" do | 29 | it "should render atom feed" do |
@@ -32,7 +32,7 @@ describe "Commits" do | @@ -32,7 +32,7 @@ describe "Commits" do | ||
32 | page.response_headers['Content-Type'].should have_content("application/atom+xml") | 32 | page.response_headers['Content-Type'].should have_content("application/atom+xml") |
33 | page.body.should have_selector("title", :text => "Recent commits to #{project.name}") | 33 | page.body.should have_selector("title", :text => "Recent commits to #{project.name}") |
34 | page.body.should have_selector("author email", :text => commit.author_email) | 34 | page.body.should have_selector("author email", :text => commit.author_email) |
35 | - page.body.should have_selector("entry summary", :text => commit.message) | 35 | + page.body.should have_selector("entry summary", :text => commit.description) |
36 | end | 36 | end |
37 | 37 | ||
38 | it "should render atom feed via private token" do | 38 | it "should render atom feed via private token" do |
@@ -42,7 +42,7 @@ describe "Commits" do | @@ -42,7 +42,7 @@ describe "Commits" do | ||
42 | page.response_headers['Content-Type'].should have_content("application/atom+xml") | 42 | page.response_headers['Content-Type'].should have_content("application/atom+xml") |
43 | page.body.should have_selector("title", :text => "Recent commits to #{project.name}") | 43 | page.body.should have_selector("title", :text => "Recent commits to #{project.name}") |
44 | page.body.should have_selector("author email", :text => commit.author_email) | 44 | page.body.should have_selector("author email", :text => commit.author_email) |
45 | - page.body.should have_selector("entry summary", :text => commit.message) | 45 | + page.body.should have_selector("entry summary", :text => commit.description) |
46 | end | 46 | end |
47 | end | 47 | end |
48 | 48 |