debian-mirror-gitlab/spec/migrations/20230509131736_add_default_organization_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
504 B
Ruby
Raw Normal View History

2023-07-09 08:55:56 +05:30
# 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