Skip to content

Commit c76a3e9

Browse files
committed
fixed rubocop issues
1 parent b30b772 commit c76a3e9

File tree

1 file changed

+13
-17
lines changed

1 file changed

+13
-17
lines changed

spec/mailtrap/contacts_api_spec.rb

Lines changed: 13 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@
152152

153153
response = client.create(contact_data)
154154
expect(response).to have_attributes(email:)
155-
expect(response.newly_created?).to eq(true)
155+
expect(response.newly_created?).to be true
156156
end
157157

158158
it 'raises error for invalid contact data' do
@@ -210,13 +210,13 @@
210210
response = client.upsert(contact_id, update_data)
211211

212212
expect(response).to have_attributes(
213-
id: contact_id,
214-
fields: include(
215-
last_name: 'Smith'
216-
),
217-
action: 'updated'
213+
id: contact_id,
214+
action: 'updated',
215+
fields: include(
216+
last_name: 'Smith'
218217
)
219-
expect(response.newly_created?).to eq(false)
218+
)
219+
expect(response.newly_created?).to be false
220220
end
221221

222222
it 'contact by email' do
@@ -231,10 +231,8 @@
231231
)
232232

233233
response = client.upsert(email, update_data)
234-
expect(response).to have_attributes(
235-
email:
236-
)
237-
expect(response.newly_created?).to eq(false)
234+
expect(response).to have_attributes(email:)
235+
expect(response.newly_created?).to be false
238236
end
239237
end
240238
# rubocop:enable RSpec/MultipleMemoizedHelpers
@@ -290,9 +288,9 @@
290288

291289
response = client.add_to_lists(contact_id, list_ids)
292290
expect(response).to have_attributes(
293-
id: contact_id,
294-
list_ids: include(1, 2, 3, 4, 5),
295-
action: 'updated'
291+
id: contact_id,
292+
list_ids: include(1, 2, 3, 4, 5),
293+
action: 'updated'
296294
)
297295
end
298296

@@ -308,9 +306,7 @@
308306
)
309307

310308
response = client.add_to_lists(email, list_ids)
311-
expect(response).to have_attributes(
312-
email:
313-
)
309+
expect(response).to have_attributes(email:)
314310
end
315311

316312
it 'handles empty list_ids array' do

0 commit comments

Comments
 (0)