Commit f9877c52 authored by Riyad Preukschas's avatar Riyad Preukschas

Update specs

parent 34cea1cb
...@@ -2,7 +2,7 @@ require 'spec_helper' ...@@ -2,7 +2,7 @@ require 'spec_helper'
describe "Commits" do describe "Commits" do
let(:project) { Factory :project } let(:project) { Factory :project }
let!(:commit) { project.commit } let!(:commit) { CommitDecorator.decorate(project.commit) }
before do before do
login_as :user login_as :user
project.add_access(@user, :read) project.add_access(@user, :read)
...@@ -22,8 +22,8 @@ describe "Commits" do ...@@ -22,8 +22,8 @@ describe "Commits" do
end end
it "should list commits" do it "should list commits" do
page.should have_content(commit.message) page.should have_content(commit.description)
page.should have_content(commit.id.to_s[0..5]) page.should have_content(commit.short_id)
end end
it "should render atom feed" do it "should render atom feed" do
...@@ -32,7 +32,7 @@ describe "Commits" do ...@@ -32,7 +32,7 @@ describe "Commits" do
page.response_headers['Content-Type'].should have_content("application/atom+xml") page.response_headers['Content-Type'].should have_content("application/atom+xml")
page.body.should have_selector("title", :text => "Recent commits to #{project.name}") page.body.should have_selector("title", :text => "Recent commits to #{project.name}")
page.body.should have_selector("author email", :text => commit.author_email) page.body.should have_selector("author email", :text => commit.author_email)
page.body.should have_selector("entry summary", :text => commit.message) page.body.should have_selector("entry summary", :text => commit.description)
end end
it "should render atom feed via private token" do it "should render atom feed via private token" do
...@@ -42,7 +42,7 @@ describe "Commits" do ...@@ -42,7 +42,7 @@ describe "Commits" do
page.response_headers['Content-Type'].should have_content("application/atom+xml") page.response_headers['Content-Type'].should have_content("application/atom+xml")
page.body.should have_selector("title", :text => "Recent commits to #{project.name}") page.body.should have_selector("title", :text => "Recent commits to #{project.name}")
page.body.should have_selector("author email", :text => commit.author_email) page.body.should have_selector("author email", :text => commit.author_email)
page.body.should have_selector("entry summary", :text => commit.message) page.body.should have_selector("entry summary", :text => commit.description)
end end
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment