Read about our upcoming Code of Conduct on this issue

Commit 1cb0c06a authored by James Lopez's avatar James Lopez Committed by Stan Hu
Browse files

add migration spec

parent 65dab4fa7fe4
# encoding: utf-8
require 'spec_helper'
require Rails.root.join('db', 'post_migrate', '20180202111106_remove_project_labels_group_id.rb')
describe RemoveProjectLabelsGroupId, :delete do
let(:migration) { }
let(:group) { create(:group) }
let!(:project_label) { create(:label, group_id: }
let!(:group_label) { create(:group_label) }
describe '#up' do
it 'updates the project labels group ID' do
expect { migration.up }.to change { project_label.reload.group_id }.from(1).to(nil)
it 'keeps the group labels group ID' do
expect { migration.up }.not_to change { group_label.reload.group_id }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment