summaryrefslogtreecommitdiff
path: root/spec/controllers/commit_controller_spec.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-12-08 15:22:04 +0100
committerDouwe Maan <douwe@gitlab.com>2015-12-08 15:22:04 +0100
commit15925290eec4f5616e12ef3169794f85150e3270 (patch)
treeb1adb5784f74a05491a38b8656e179f451b79e5e /spec/controllers/commit_controller_spec.rb
parent0c3f70acf4838194f517c02874b8423303c21b48 (diff)
parent51ed5225adf4aac3ccbf715f8647258dac784abb (diff)
downloadgitlab-ce-ui/dashboard-new-issue.tar.gz
Merge branch 'master' into ui/dashboard-new-issueui/dashboard-new-issue
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