Skip to content

Commit 09f1fc3

Browse files
authored
Bump Strava version to 2.3.0 and enhance club events spec (#87)
1 parent 4f4105b commit 09f1fc3

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1-
### 2.2.1 (Next)
1+
### 2.3.0 (Next)
22

3+
* [#87](https://github.com/dblock/strava-ruby-client/pull/87): Prepares v2.3.0 by improving the event specs - [@simonneutert](https://github.com/simonneutert).
34
* [#86](https://github.com/dblock/strava-ruby-client/pull/86): Add description to club event model - [@tobiaszwaszak](https://github.com/tobiaszwaszak).
45
* Your contribution here.
56

lib/strava/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# frozen_string_literal: true
22

33
module Strava
4-
VERSION = '2.2.1'
4+
VERSION = '2.3.0'
55
end

spec/strava/api/client/endpoints/clubs/club_events_spec.rb

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,27 @@
66
include_context 'with API client'
77
it 'returns club events' do
88
club_events = client.club_events('456773')
9-
expect(club_events.size).to eq 107
109
expect(club_events).to be_a Enumerable
11-
event = club_events.first
10+
expect(club_events.size).to eq 107
11+
event = club_events.find { |e| e.id == 340_487 }
12+
expect(event.id).to be_a Integer
13+
expect(event.id).to eq(340_487)
1214
expect(event.women_only).to be_a FalseClass
1315
expect(event.private).to be_a FalseClass
1416
expect(event.description).to be_a String
17+
expect(event.description.size).to eq(546)
18+
expect(event.description).to start_with('Damit die Fahrt stattfindet wird')
1519
expect(event.resource_state).to be_a Integer
20+
expect(event.resource_state).to eq(2)
1621
expect(event.club_id).to be_a Integer
22+
expect(event.club_id).to eq(456_773)
1723
expect(event.skill_levels).to be_a Integer
24+
expect(event.skill_levels).to eq(1)
1825
expect(event.terrain).to be_a Integer
1926
expect(event.route_id).to be_a(Integer).or(be_nil)
2027
expect(event.upcoming_occurrences).to be_a Enumerable
2128
expect(event.upcoming_occurrences.first).to be_a Time
29+
expect(event.upcoming_occurrences.first).to eq(Time.new(2018, 6, 23, 8, 30, 0, '+00:00'))
2230
expect(event).to be_a Strava::Models::ClubEvent
2331
end
2432
end

0 commit comments

Comments
 (0)