Skip to content

Commit b31fa5a

Browse files
committed
Ignore :welsh_enabled in Group model
1 parent 4991eae commit b31fa5a

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

app/models/group.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
class Group < ApplicationRecord
2+
self.ignored_columns += [:welsh_enabled]
3+
24
belongs_to :organisation
35

46
belongs_to :creator, class_name: "User", optional: true

spec/features/form/create_a_welsh_form_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
require "rails_helper"
22

33
feature "Create a form with a welsh version", type: :feature do
4-
let(:group) { create(:group, name: "Welsh enabled", organisation: standard_user.organisation, status: "active", welsh_enabled: true) }
4+
let(:group) { create(:group, name: "Welsh enabled", organisation: standard_user.organisation, status: "active") }
55

66
before do
77
GroupForm.create!(group:, form_id: form.id)

spec/models/form_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,7 @@
980980
end
981981

982982
describe "#all_task_statuses" do
983-
let(:group) { create :group}
983+
let(:group) { create :group }
984984
let(:completed_form) { build :form, :live, :with_group, group: }
985985

986986
it "returns a hash with each of the task statuses" do

spec/models/group_spec.rb

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -291,18 +291,6 @@
291291
end
292292
end
293293

294-
describe "welsh_enabled" do
295-
it "has a default welsh_enabled of false" do
296-
group = described_class.build(name: "Test Group")
297-
expect(group.welsh_enabled).to be(false)
298-
end
299-
300-
it "can be set to true" do
301-
group = build :group, welsh_enabled: true
302-
expect(group).to be_valid
303-
end
304-
end
305-
306294
describe "ordering" do
307295
it "orders groups by name" do
308296
user = create :user

0 commit comments

Comments
 (0)