blob: 539216c57eed8bd09018034c9ff9faf996e7c77a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
# frozen_string_literal: true
require 'spec_helper'
require_migration!
RSpec.describe AddDefaultOrganization, feature_category: :cell do
let(:organization) { table(:organizations) }
it "correctly migrates up and down" do
reversible_migration do |migration|
migration.before -> {
expect(organization.where(id: 1, name: 'Default')).to be_empty
}
migration.after -> {
expect(organization.where(id: 1, name: 'Default')).not_to be_empty
}
end
end
end
|