Skip to content

Commit d4d0d13

Browse files
committed
fix(api-keys): correct list test assertions to use [:data] key
1 parent 8059477 commit d4d0d13

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

spec/api_keys_spec.rb

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@
5757
]
5858
}
5959
allow_any_instance_of(Resend::Request).to receive(:perform).and_return(resp)
60-
expect(Resend::ApiKeys.list.length).to eql(2)
61-
expect(Resend::ApiKeys.list.first[:last_used_at]).to eql("2023-04-22T10:00:00.000000+00:00")
62-
expect(Resend::ApiKeys.list.last[:last_used_at]).to be_nil
60+
expect(Resend::ApiKeys.list[:data].length).to eql(2)
61+
expect(Resend::ApiKeys.list[:data].first[:last_used_at]).to eql("2023-04-22T10:00:00.000000+00:00")
62+
expect(Resend::ApiKeys.list[:data].last[:last_used_at]).to be_nil
6363
end
6464
end
6565

@@ -127,9 +127,9 @@
127127
]
128128
}
129129
allow_any_instance_of(Resend::Request).to receive(:perform).and_return(resp)
130-
expect(Resend::ApiKeys.list.length).to eql(2)
131-
expect(Resend::ApiKeys.list.first[:last_used_at]).to eql("2023-04-22T10:00:00.000000+00:00")
132-
expect(Resend::ApiKeys.list.last[:last_used_at]).to be_nil
130+
expect(Resend::ApiKeys.list[:data].length).to eql(2)
131+
expect(Resend::ApiKeys.list[:data].first[:last_used_at]).to eql("2023-04-22T10:00:00.000000+00:00")
132+
expect(Resend::ApiKeys.list[:data].last[:last_used_at]).to be_nil
133133
end
134134
end
135135

0 commit comments

Comments
 (0)