Rails5 fix update_attribute usage not causing a save

This commit is contained in:
Jasper Maes 2018-06-15 07:57:35 +02:00
parent fb08183e63
commit f1955962d9
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