Merge branch 'rails5-fix-47960' into 'master'

Rails5 fix update_attribute usage not causing a save

Closes #47960

See merge request gitlab-org/gitlab-ce!19881
This commit is contained in:
Rémy Coutable 2018-06-18 08:58:23 +00:00
commit 99fdbe4c23
2 changed files with 9 additions and 4 deletions

View File

@ -0,0 +1,5 @@
---
title: Rails5 fix update_attribute usage not causing a save
merge_request: 19881
author: Jasper Maes
type: fixed

View File

@ -29,7 +29,7 @@ describe Projects::ImportsController do
context 'when import is in progress' do
before do
project.update_attribute(:import_status, :started)
project.update_attributes(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_attribute(:import_status, :failed)
project.update_attributes(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_attribute(:import_status, :finished)
project.update_attributes(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_attribute(:import_status, :none)
project.update_attributes(import_status: :none)
end
it 'redirects to namespace_project_path' do