summaryrefslogtreecommitdiff
path: root/spec/controllers
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-09-25 23:40:04 -0400
committerRobert Speicher <rspeicher@gmail.com>2012-09-26 16:32:25 -0400
commit1799cf3b49dbe243e21f13d51496be7d60d1a73f (patch)
tree1a428dc384801507f5a5857941fea8fa51428194 /spec/controllers
parent275db3c522200b68673c4ea6a16046b3582cda2f (diff)
downloadgitlab-ce-1799cf3b49dbe243e21f13d51496be7d60d1a73f.tar.gz
Add CommitsController spec to make sure atom feeds work
Diffstat (limited to 'spec/controllers')
-rw-r--r--spec/controllers/commits_controller_spec.rb22
1 files changed, 22 insertions, 0 deletions
diff --git a/spec/controllers/commits_controller_spec.rb b/spec/controllers/commits_controller_spec.rb
new file mode 100644
index 00000000000..bf335634da9
--- /dev/null
+++ b/spec/controllers/commits_controller_spec.rb
@@ -0,0 +1,22 @@
+require 'spec_helper'
+
+describe CommitsController do
+ let(:project) { create(:project) }
+ let(:user) { create(:user) }
+
+ before do
+ sign_in(user)
+
+ project.add_access(user, :read, :admin)
+ end
+
+ describe "GET show" do
+ context "as atom feed" do
+ it "should render as atom" do
+ get :show, project_id: project.code, id: "master.atom"
+ response.should be_success
+ response.content_type.should == 'application/atom+xml'
+ end
+ end
+ end
+end