Skip to content

Commit 2ac92e7

Browse files
committed
cater for Organization field being marked for deletion
1 parent 9fd13ee commit 2ac92e7

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spec/live/organization_field_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ def valid_attributes
88
it_should_be_creatable
99
it_should_be_updatable :title, "key"
1010
it_should_be_readable :organization_fields, :create => true
11-
it_should_be_deletable
11+
it_should_be_deletable :marked_for_deletion => true
1212
end

spec/macros/resource_macros.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def it_should_be_deletable(options = {})
110110
if options[:find]
111111
expect(obj.send(options[:find].first)).to eq(options[:find].last)
112112
else
113-
expect(obj.nil? || !obj.active?).to eq(true)
113+
options[:marked_for_deletion] ? (expect(obj.active?).to be_falsey) : (expect(obj).to be_nil)
114114
end
115115
end
116116
end

0 commit comments

Comments
 (0)