Skip to content

Commit 1cdb12c

Browse files
committed
Merge remote-tracking branch 'origin' into fix/add_create_or_update_method_to_collection
2 parents f8e46d9 + e0b8ecb commit 1cdb12c

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

spec/live/target_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@ def valid_attributes
1212

1313
it_should_be_readable :targets, :create => :true
1414
it_should_be_creatable
15-
it_should_be_updatable :email, "bye@example.com"
15+
it_should_be_updatable :active, false
1616
it_should_be_deletable
1717
end

spec/live/user_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
describe ZendeskAPI::User, :delete_after do
44
def valid_attributes
5-
{ :name => "Test U.", :email => "test@example.org" }
5+
{ name: "Test U.", email: "test+#{Time.now.to_i}@example.org" }
66
end
77

88
it_should_be_creatable

spec/macros/resource_macros.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ def it_should_be_creatable(options = {})
3737
end
3838

3939
after(:all) do
40+
return unless @object.id
41+
4042
VCR.use_cassette("#{described_class.to_s}_create_delete") do
4143
@object.destroy
4244
end
@@ -78,6 +80,8 @@ def it_should_be_updatable(attribute, value = "TESTDATA", extra = {})
7880
end
7981

8082
after(:all) do
83+
return unless @object.id
84+
8185
VCR.use_cassette("#{described_class.to_s}_update_delete") do
8286
@object.destroy
8387
end

0 commit comments

Comments
 (0)