summaryrefslogtreecommitdiff
path: root/spec/controllers/commit_controller_spec.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-08 12:50:25 +0100
committerDouwe Maan <douwe@gitlab.com>2015-12-08 12:50:25 +0100
commit3c80a543153f8f686ec99d2d04b181b2d2c8a665 (patch)
tree679ca3921b00bd9e0904b4ad1be4e01d0a753ee9 /spec/controllers/commit_controller_spec.rb
parent1a942111653e9376d6275c5bd31f23cb27f58ab5 (diff)
parentf5430e48b42227f1c1874ca27c6907f0f704be28 (diff)
downloadgitlab-ce-ui/misc.tar.gz
Merge branch 'master' into ui/miscui/misc
Diffstat (limited to 'spec/controllers/commit_controller_spec.rb')
-rw-r--r--spec/controllers/commit_controller_spec.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/spec/controllers/commit_controller_spec.rb b/spec/controllers/commit_controller_spec.rb
index 5337a69e84b..7793bf1e421 100644
--- a/spec/controllers/commit_controller_spec.rb
+++ b/spec/controllers/commit_controller_spec.rb
@@ -110,6 +110,26 @@ describe Projects::CommitController do
expect(response.body).to match(/^diff --git/)
end
end
+
+ context 'commit that removes a submodule' do
+ render_views
+
+ let(:fork_project) { create(:forked_project_with_submodules) }
+ let(:commit) { fork_project.commit('remove-submodule') }
+
+ before do
+ fork_project.team << [user, :master]
+ end
+
+ it 'renders it' do
+ get(:show,
+ namespace_id: fork_project.namespace.to_param,
+ project_id: fork_project.to_param,
+ id: commit.id)
+
+ expect(response).to be_success
+ end
+ end
end
describe "#branches" do