summaryrefslogtreecommitdiff
path: root/spec/requests/commits_spec.rb
diff options
context:
space:
mode:
authorgitlabhq <m@gitlabhq.com>2011-10-09 00:36:38 +0300
committergitlabhq <m@gitlabhq.com>2011-10-09 00:36:38 +0300
commit9ba1224867665844b117fa037e1465bb706b3685 (patch)
tree52fbfc1cdb55df21843965479c97be0c91121a9a /spec/requests/commits_spec.rb
parent93efff945215a4407afcaf0cba15ac601b56df0d (diff)
downloadgitlab-ce-9ba1224867665844b117fa037e1465bb706b3685.tar.gz
init commit
Diffstat (limited to 'spec/requests/commits_spec.rb')
-rw-r--r--spec/requests/commits_spec.rb39
1 files changed, 39 insertions, 0 deletions
diff --git a/spec/requests/commits_spec.rb b/spec/requests/commits_spec.rb
new file mode 100644
index 00000000000..cd7314f9812
--- /dev/null
+++ b/spec/requests/commits_spec.rb
@@ -0,0 +1,39 @@
+require 'spec_helper'
+
+describe "Commits" do
+ let(:project) { Factory :project }
+ let!(:commit) { project.repo.commits.first }
+ before do
+ login_as :user
+ project.add_access(@user, :read)
+ end
+
+ describe "GET /commits" do
+ before do
+ visit project_commits_path(project)
+ end
+
+ it "should have valid path" do
+ current_path.should == project_commits_path(project)
+ end
+
+ it "should have project name" do
+ page.should have_content(project.name)
+ end
+
+ it "should list commits" do
+ page.should have_content(commit.author)
+ page.should have_content(commit.message)
+ end
+ end
+
+ describe "GET /commits/:id" do
+ before do
+ visit project_commit_path(project, commit)
+ end
+
+ it "should have valid path" do
+ current_path.should == project_commit_path(project, commit)
+ end
+ end
+end