diff options
Diffstat (limited to 'spec/controllers')
5 files changed, 9 insertions, 9 deletions
diff --git a/spec/controllers/projects/forks_controller_spec.rb b/spec/controllers/projects/forks_controller_spec.rb index e20623c0ac1..945b6142abf 100644 --- a/spec/controllers/projects/forks_controller_spec.rb +++ b/spec/controllers/projects/forks_controller_spec.rb @@ -31,7 +31,7 @@ describe Projects::ForksController do context 'when fork is private' do before do - forked_project.update_attributes(visibility_level: Project::PRIVATE, group: group) + forked_project.update(visibility_level: Project::PRIVATE, group: group) end it 'is not be visible for non logged in users' do diff --git a/spec/controllers/projects/group_links_controller_spec.rb b/spec/controllers/projects/group_links_controller_spec.rb index 72f6af112b3..78c6f7839b4 100644 --- a/spec/controllers/projects/group_links_controller_spec.rb +++ b/spec/controllers/projects/group_links_controller_spec.rb @@ -23,7 +23,7 @@ describe Projects::GroupLinksController do context 'when project is not allowed to be shared with a group' do before do - group.update_attributes(share_with_group_lock: false) + group.update(share_with_group_lock: false) end include_context 'link project to group' diff --git a/spec/controllers/projects/imports_controller_spec.rb b/spec/controllers/projects/imports_controller_spec.rb index 812833cc86b..6f06210f3de 100644 --- a/spec/controllers/projects/imports_controller_spec.rb +++ b/spec/controllers/projects/imports_controller_spec.rb @@ -29,7 +29,7 @@ describe Projects::ImportsController do context 'when import is in progress' do before do - project.update_attributes(import_status: :started) + project.update(import_status: :started) end it 'renders template' do @@ -47,7 +47,7 @@ describe Projects::ImportsController do context 'when import failed' do before do - project.update_attributes(import_status: :failed) + project.update(import_status: :failed) end it 'redirects to new_namespace_project_import_path' do @@ -59,7 +59,7 @@ describe Projects::ImportsController do context 'when import finished' do before do - project.update_attributes(import_status: :finished) + project.update(import_status: :finished) end context 'when project is a fork' do @@ -108,7 +108,7 @@ describe Projects::ImportsController do context 'when import never happened' do before do - project.update_attributes(import_status: :none) + project.update(import_status: :none) end it 'redirects to namespace_project_path' do diff --git a/spec/controllers/projects/merge_requests_controller_spec.rb b/spec/controllers/projects/merge_requests_controller_spec.rb index 7f5f0b76c51..444415011a9 100644 --- a/spec/controllers/projects/merge_requests_controller_spec.rb +++ b/spec/controllers/projects/merge_requests_controller_spec.rb @@ -315,7 +315,7 @@ describe Projects::MergeRequestsController do context 'when the merge request is not mergeable' do before do - merge_request.update_attributes(title: "WIP: #{merge_request.title}") + merge_request.update(title: "WIP: #{merge_request.title}") post :merge, base_params end diff --git a/spec/controllers/projects_controller_spec.rb b/spec/controllers/projects_controller_spec.rb index a2dfc43e9f7..fd7d867f9e5 100644 --- a/spec/controllers/projects_controller_spec.rb +++ b/spec/controllers/projects_controller_spec.rb @@ -166,7 +166,7 @@ describe ProjectsController do User.project_views.keys.each do |project_view| context "with #{project_view} view set" do before do - user.update_attributes(project_view: project_view) + user.update(project_view: project_view) get :show, namespace_id: empty_project.namespace, id: empty_project end @@ -188,7 +188,7 @@ describe ProjectsController do User.project_views.keys.each do |project_view| context "with #{project_view} view set" do before do - user.update_attributes(project_view: project_view) + user.update(project_view: project_view) get :show, namespace_id: empty_project.namespace, id: empty_project end |