Use Commit#show instead of Commits#show to view a single commit

Commits#show (plural) is going to be for showing commit history on a
specific path.
This commit is contained in:
Robert Speicher 2012-09-17 10:06:56 -04:00
parent a21abce94f
commit b389247c02
10 changed files with 40 additions and 28 deletions

View file

@ -49,13 +49,13 @@ describe "Gitlab Flavored Markdown" do
end
it "should render title in commits#show" do
visit project_commit_path(project, id: commit.id)
visit project_commit_path(project, commit)
page.should have_link("##{issue.id}")
end
it "should render description in commits#show" do
visit project_commit_path(project, id: commit.id)
visit project_commit_path(project, commit)
page.should have_link("@#{fred.name}")
end
@ -175,7 +175,7 @@ describe "Gitlab Flavored Markdown" do
describe "for notes" do
it "should render in commits#show", js: true do
visit project_commit_path(project, id: commit.id)
visit project_commit_path(project, commit)
fill_in "note_note", with: "see ##{issue.id}"
click_button "Add Comment"

View file

@ -298,6 +298,14 @@ describe HooksController, "routing" do
end
end
# project_commit GET /:project_id/commit/:id(.:format) commit#show {:id=>/[[:alnum:]]{6,40}/, :project_id=>/[^\/]+/}
describe CommitController, "routing" do
it "to #show" do
get("/gitlabhq/commit/4246fb").should route_to('commit#show', project_id: 'gitlabhq', id: '4246fb')
get("/gitlabhq/commit/4246fbd13872934f72a8fd0d6fb1317b47b59cb5").should route_to('commit#show', project_id: 'gitlabhq', id: '4246fbd13872934f72a8fd0d6fb1317b47b59cb5')
end
end
# compare_project_commits GET /:project_id/commits/compare(.:format) commits#compare
# patch_project_commit GET /:project_id/commits/:id/patch(.:format) commits#patch
# project_commits GET /:project_id/commits(.:format) commits#index
@ -317,6 +325,7 @@ describe CommitsController, "routing" do
end
it_behaves_like "RESTful project resources" do
let(:actions) { [:index, :show] }
let(:controller) { 'commits' }
end
end