diff options
author | John Jarvis <jarv@gitlab.com> | 2019-04-02 11:12:32 +0300 |
---|---|---|
committer | John Jarvis <jarv@gitlab.com> | 2019-04-02 11:12:32 +0300 |
commit | 69b65a6b745e74bba290787420a0017395fd7c25 (patch) | |
tree | c328963cbe5b340c58c88230d21f338c77462ebd /spec/controllers | |
parent | 1b6fe3ae226e4c6f481c90c886e242fcd96ab11b (diff) | |
parent | 3e81a5baf25d6ecd9ad807a2b8f4238dcc598d5e (diff) |
Merge branch 'master' of dev.gitlab.org:gitlab/gitlabhq into jarv/dev-to-gitlab-2019-04-02
Diffstat (limited to 'spec/controllers')
-rw-r--r-- | spec/controllers/projects/graphs_controller_spec.rb | 1 | ||||
-rw-r--r-- | spec/controllers/projects_controller_spec.rb | 17 |
2 files changed, 18 insertions, 0 deletions
diff --git a/spec/controllers/projects/graphs_controller_spec.rb b/spec/controllers/projects/graphs_controller_spec.rb index 8decd8f1382..df6a6e00f73 100644 --- a/spec/controllers/projects/graphs_controller_spec.rb +++ b/spec/controllers/projects/graphs_controller_spec.rb @@ -27,6 +27,7 @@ describe Projects::GraphsController do describe 'charts' do context 'when languages were previously detected' do + let(:project) { create(:project, :repository, detected_repository_languages: true) } let!(:repository_language) { create(:repository_language, project: project) } it 'sets the languages properly' do diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index a1662658ade..356d606d5c5 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -369,6 +369,23 @@ describe ProjectsController do end end + it 'does not update namespace' do + controller.instance_variable_set(:@project, project) + + params = { + namespace_id: 'test' + } + + expect do + put :update, + params: { + namespace_id: project.namespace, + id: project.id, + project: params + } + end.not_to change { project.namespace.reload } + end + def update_project(**parameters) put :update, params: { |