Skip to content

Commit da73e01

Browse files
Doorkeeperのイベントデータをハッシュから配列に変更し、テストも更新
1 parent a8be062 commit da73e01

File tree

2 files changed

+25
-3
lines changed

2 files changed

+25
-3
lines changed

spec/lib/event_service/providers/doorkeeper_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@
2121
it do
2222
expect(subject).to be_instance_of(Array)
2323
expect(subject.size).to eq 1
24-
expect(subject.first['id']).to eq 1234
25-
expect(subject.first['group']).to eq 5555
24+
expect(subject.first[:id]).to eq 1234
25+
expect(subject.first[:group]).to eq 5555
2626
end
2727
end
2828
end

spec/support/shared_contexts/statistics.rb

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,29 @@
8383
[
8484
200,
8585
{ 'Content-Type' => 'application/json' },
86-
'[{"event":{"title":"CoderDojo title","id":1234,"starts_at":"2017-05-28T01:00:00.000Z","ends_at":"2017-05-28T04:00:00.000Z","venue_name":"奥多摩町","address":"奥多摩町","lat":"35.801763000000","long":"139.087656000000","ticket_limit":30,"published_at":"2017-04-22T03:43:04.000Z","updated_at":"2017-05-10T11:31:21.810Z","group":5555,"banner":null,"description":"CoderDojo description","public_url":"https://coderdojo-okutama.doorkeeper.jp/events/8888","participants":12,"waitlisted":0}}]'
86+
[
87+
{
88+
event: {
89+
title: "CoderDojo title",
90+
id: 1234,
91+
starts_at: "2017-05-28T01:00:00.000Z",
92+
ends_at: "2017-05-28T04:00:00.000Z",
93+
venue_name: "奥多摩町",
94+
address: "奥多摩町",
95+
lat: "35.801763000000",
96+
long: "139.087656000000",
97+
ticket_limit: 30,
98+
published_at: "2017-04-22T03:43:04.000Z",
99+
updated_at: "2017-05-10T11:31:21.810Z",
100+
group: 5555,
101+
banner: nil,
102+
description: "CoderDojo description",
103+
public_url: "https://coderdojo-okutama.doorkeeper.jp/events/8888",
104+
participants: 12,
105+
waitlisted: 0
106+
}
107+
}
108+
]
87109
]
88110
end
89111
end

0 commit comments

Comments
 (0)