Enable soft_deletion of Legislation::DraftVersion::Translations
This commit is contained in:
committed by
voodoorai2000
parent
458fb750eb
commit
f6b41f916b
@@ -0,0 +1,6 @@
|
||||
class AddHiddenAtToLegislationDraftVersionTranslations < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :legislation_draft_version_translations, :hidden_at, :datetime
|
||||
add_index :legislation_draft_version_translations, :hidden_at
|
||||
end
|
||||
end
|
||||
@@ -716,6 +716,8 @@ ActiveRecord::Schema.define(version: 20190607160900) do
|
||||
t.text "body"
|
||||
t.text "body_html"
|
||||
t.text "toc_html"
|
||||
t.datetime "hidden_at"
|
||||
t.index ["hidden_at"], name: "index_legislation_draft_version_translations_on_hidden_at", using: :btree
|
||||
t.index ["legislation_draft_version_id"], name: "index_900e5ba94457606e69e89193db426e8ddff809bc", using: :btree
|
||||
t.index ["locale"], name: "index_legislation_draft_version_translations_on_locale", using: :btree
|
||||
end
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
require "rails_helper"
|
||||
|
||||
RSpec.describe Legislation::DraftVersion, type: :model do
|
||||
let(:legislation_draft_version) { build(:legislation_draft_version) }
|
||||
describe Legislation::DraftVersion do
|
||||
let(:legislation_draft_version) { build(:legislation_draft_version) }
|
||||
|
||||
it_behaves_like "acts as paranoid", :legislation_draft_version
|
||||
|
||||
it "is valid" do
|
||||
expect(legislation_draft_version).to be_valid
|
||||
|
||||
Reference in New Issue
Block a user