cybercoach 0.3.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -1
- data/lib/cybercoach.rb +1 -0
- data/lib/cybercoach/abstract_resource.rb +33 -11
- data/lib/cybercoach/entry.rb +4 -0
- data/lib/cybercoach/hash_initializable.rb +50 -0
- data/lib/cybercoach/pageable.rb +4 -3
- data/lib/cybercoach/partnership.rb +4 -0
- data/lib/cybercoach/post_createable.rb +6 -4
- data/lib/cybercoach/put_createable.rb +6 -4
- data/lib/cybercoach/resource.rb +19 -10
- data/lib/cybercoach/resource_page.rb +26 -14
- data/lib/cybercoach/sport.rb +4 -0
- data/lib/cybercoach/subscription.rb +4 -0
- data/lib/cybercoach/user.rb +9 -5
- data/lib/cybercoach/version.rb +1 -1
- data/spec/lib/cybercoach/entry_spec.rb +97 -22
- data/spec/lib/cybercoach/partnership_spec.rb +82 -14
- data/spec/lib/cybercoach/privacy_level_spec.rb +1 -1
- data/spec/lib/cybercoach/resource_page_spec.rb +41 -2
- data/spec/lib/cybercoach/settings_spec.rb +1 -1
- data/spec/lib/cybercoach/sport_spec.rb +34 -4
- data/spec/lib/cybercoach/subscription_spec.rb +97 -28
- data/spec/lib/cybercoach/user_helper.rb +0 -9
- data/spec/lib/cybercoach/user_spec.rb +87 -12
- data/spec/lib/integration_spec.rb +15 -15
- metadata +4 -3
data/lib/cybercoach/user.rb
CHANGED
@@ -45,11 +45,11 @@ module CyberCoach
|
|
45
45
|
#
|
46
46
|
|
47
47
|
attr_accessor :username,
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
48
|
+
:email,
|
49
|
+
:password,
|
50
|
+
:real_name,
|
51
|
+
:privacy_level,
|
52
|
+
:date_created
|
53
53
|
|
54
54
|
#
|
55
55
|
# :category: Serialization
|
@@ -155,5 +155,9 @@ module CyberCoach
|
|
155
155
|
def invalidate_options
|
156
156
|
@options = @options.merge(authentication)
|
157
157
|
end
|
158
|
+
|
159
|
+
def initializable_with
|
160
|
+
super + [:username, :email, :password, :real_name, :privacy_level]
|
161
|
+
end
|
158
162
|
end
|
159
163
|
end
|
data/lib/cybercoach/version.rb
CHANGED
@@ -2,8 +2,8 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'Entry' do
|
4
4
|
before(:context) do
|
5
|
-
@proposer = UserHelper.make(
|
6
|
-
@proposed = UserHelper.make(
|
5
|
+
@proposer = UserHelper.make(8)
|
6
|
+
@proposed = UserHelper.make(9)
|
7
7
|
ResourceHelper.safe_delete(@proposer)
|
8
8
|
ResourceHelper.safe_delete(@proposed)
|
9
9
|
@proposer.create
|
@@ -12,10 +12,10 @@ describe 'Entry' do
|
|
12
12
|
@partnership.proposer = @proposer
|
13
13
|
@partnership.proposed = @proposed
|
14
14
|
@partnership.privacy_level = CyberCoach::PrivacyLevel::REGISTERED_USER
|
15
|
-
ResourceHelper.safe_delete(@partnership,
|
16
|
-
ResourceHelper.safe_delete(@partnership,
|
17
|
-
@partnership.create(
|
18
|
-
@partnership.update(
|
15
|
+
ResourceHelper.safe_delete(@partnership, @proposer.authentication)
|
16
|
+
ResourceHelper.safe_delete(@partnership, @proposed.authentication)
|
17
|
+
@partnership.create(@proposer.authentication)
|
18
|
+
@partnership.update(@proposed.authentication)
|
19
19
|
@sport = CyberCoach::Sport.new
|
20
20
|
@sport.name = 'Running'
|
21
21
|
@sport.read
|
@@ -23,13 +23,13 @@ describe 'Entry' do
|
|
23
23
|
@subscription.subscriber = @partnership
|
24
24
|
@subscription.sport = @sport
|
25
25
|
@subscription.privacy_level = CyberCoach::PrivacyLevel::REGISTERED_USER
|
26
|
-
@subscription.create(
|
26
|
+
@subscription.create(@proposer.authentication)
|
27
27
|
end
|
28
28
|
|
29
29
|
after(:context) do
|
30
|
-
ResourceHelper.safe_delete(@subscription,
|
31
|
-
ResourceHelper.safe_delete(@partnership,
|
32
|
-
ResourceHelper.safe_delete(@partnership,
|
30
|
+
ResourceHelper.safe_delete(@subscription, @proposer.authentication)
|
31
|
+
ResourceHelper.safe_delete(@partnership, @proposer.authentication)
|
32
|
+
ResourceHelper.safe_delete(@partnership, @proposed.authentication)
|
33
33
|
ResourceHelper.safe_delete(@proposer)
|
34
34
|
ResourceHelper.safe_delete(@proposed)
|
35
35
|
end
|
@@ -43,28 +43,57 @@ describe 'Entry' do
|
|
43
43
|
@entry.privacy_level = CyberCoach::PrivacyLevel::REGISTERED_USER
|
44
44
|
end
|
45
45
|
|
46
|
+
it 'should instantiate itself with preset attributes' do
|
47
|
+
uri = '/pants/'
|
48
|
+
id = 1
|
49
|
+
subscription = CyberCoach::Subscription.new
|
50
|
+
comment = 'those pants are fancy'
|
51
|
+
location = 'in your pants'
|
52
|
+
duration = 123
|
53
|
+
privacy_level = CyberCoach::PrivacyLevel::OWNER
|
54
|
+
pants = 'yes'
|
55
|
+
@entry = CyberCoach::Entry.new(
|
56
|
+
uri: uri,
|
57
|
+
id: id,
|
58
|
+
subscription: subscription,
|
59
|
+
comment: comment,
|
60
|
+
location: location,
|
61
|
+
duration: duration,
|
62
|
+
privacy_level: privacy_level,
|
63
|
+
pants: pants
|
64
|
+
)
|
65
|
+
expect(@entry.uri).to be(uri)
|
66
|
+
expect(@entry.id).to be(id)
|
67
|
+
expect(@entry.subscription).to be(subscription)
|
68
|
+
expect(@entry.comment).to be(comment)
|
69
|
+
expect(@entry.location).to be(location)
|
70
|
+
expect(@entry.duration).to be(duration)
|
71
|
+
expect(@entry.privacy_level).to be(privacy_level)
|
72
|
+
expect { @entry.pants }.to raise_error(NoMethodError)
|
73
|
+
end
|
74
|
+
|
46
75
|
it 'should raise an error if it does not exist' do
|
47
76
|
@entry.id = 1
|
48
|
-
expect { @entry.read(
|
77
|
+
expect { @entry.read(@proposer.authentication) }.to raise_error(CyberCoach::HttpError)
|
49
78
|
end
|
50
79
|
|
51
80
|
describe 'crud' do
|
52
81
|
before(:example) do
|
53
|
-
ResourceHelper.safe_delete(@entry,
|
82
|
+
ResourceHelper.safe_delete(@entry, @proposer.authentication)
|
54
83
|
end
|
55
84
|
|
56
85
|
after(:example) do
|
57
|
-
ResourceHelper.safe_delete(@entry,
|
86
|
+
ResourceHelper.safe_delete(@entry, @proposer.authentication)
|
58
87
|
end
|
59
88
|
|
60
89
|
it 'should create itself' do
|
61
|
-
@entry.create(
|
90
|
+
@entry.create(@proposer.authentication)
|
62
91
|
expect(@entry.id).not_to be_nil
|
63
92
|
end
|
64
93
|
|
65
94
|
it 'should read itself' do
|
66
|
-
@entry.create(
|
67
|
-
@entry.read(
|
95
|
+
@entry.create(@proposer.authentication)
|
96
|
+
@entry.read(@proposer.authentication)
|
68
97
|
expect(@entry.id).not_to be_nil
|
69
98
|
expect(@entry.uri).not_to be_nil
|
70
99
|
expect(@entry.subscription.uri).to eq(@subscription.uri)
|
@@ -77,19 +106,65 @@ describe 'Entry' do
|
|
77
106
|
end
|
78
107
|
|
79
108
|
it 'should update itself' do
|
80
|
-
@entry.create(
|
109
|
+
@entry.create(@proposer.authentication)
|
81
110
|
old_privacy_level = @entry.privacy_level
|
82
111
|
new_privacy_level = CyberCoach::PrivacyLevel::EVERYBODY
|
83
112
|
@entry.privacy_level = new_privacy_level
|
84
|
-
@entry.update(
|
113
|
+
@entry.update(@proposer.authentication)
|
85
114
|
expect(@entry.privacy_level).not_to eq(old_privacy_level)
|
86
115
|
expect(@entry.privacy_level).to eq(new_privacy_level)
|
87
116
|
end
|
88
117
|
|
89
118
|
it 'should delete itself' do
|
90
|
-
@entry.create(
|
91
|
-
@entry.delete(
|
92
|
-
expect { @entry.read(
|
119
|
+
@entry.create(@proposer.authentication)
|
120
|
+
@entry.delete(@proposer.authentication)
|
121
|
+
expect { @entry.read(@proposer.authentication) }.to raise_error(CyberCoach::HttpError)
|
122
|
+
end
|
123
|
+
end
|
124
|
+
|
125
|
+
describe 'invalidation' do
|
126
|
+
before(:example) do
|
127
|
+
ResourceHelper.safe_delete(@entry, @proposer.authentication)
|
128
|
+
end
|
129
|
+
|
130
|
+
after(:example) do
|
131
|
+
ResourceHelper.safe_delete(@entry, @proposer.authentication)
|
132
|
+
end
|
133
|
+
|
134
|
+
xit 'should not invalidate when creating' do
|
135
|
+
# TODO crap, this impossible to test...
|
136
|
+
id = @entry.id
|
137
|
+
@entry.id = 1234
|
138
|
+
expect(@entry.id).not_to eq(id)
|
139
|
+
expect { @entry.create(@proposer.authentication, false) }.not_to raise_error
|
140
|
+
@entry.id = id
|
141
|
+
end
|
142
|
+
|
143
|
+
it 'should not invalidate when reading' do
|
144
|
+
@entry.create(@proposer.authentication)
|
145
|
+
id = @entry.id
|
146
|
+
@entry.id = 1234
|
147
|
+
expect(@entry.id).not_to eq(id)
|
148
|
+
expect { @entry.read(@proposer.authentication, false) }.not_to raise_error
|
149
|
+
@entry.id = id
|
150
|
+
end
|
151
|
+
|
152
|
+
it 'should not invalidate when updating' do
|
153
|
+
@entry.create(@proposer.authentication)
|
154
|
+
id = @entry.id
|
155
|
+
@entry.id = 1234
|
156
|
+
expect(@entry.id).not_to eq(id)
|
157
|
+
expect { @entry.update(@proposer.authentication, false) }.not_to raise_error
|
158
|
+
@entry.id = id
|
159
|
+
end
|
160
|
+
|
161
|
+
it 'should not invalidate when deleting' do
|
162
|
+
@entry.create(@proposer.authentication)
|
163
|
+
id = @entry.id
|
164
|
+
@entry.id = 1234
|
165
|
+
expect(@entry.id).not_to eq(id)
|
166
|
+
expect { @entry.delete(@proposer.authentication, false) }.not_to raise_error
|
167
|
+
@entry.id = id
|
93
168
|
end
|
94
169
|
end
|
95
|
-
end
|
170
|
+
end
|
@@ -2,8 +2,8 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe 'Partnership' do
|
4
4
|
before(:context) do
|
5
|
-
@proposer = UserHelper.make(
|
6
|
-
@proposed = UserHelper.make(
|
5
|
+
@proposer = UserHelper.make(8)
|
6
|
+
@proposed = UserHelper.make(9)
|
7
7
|
ResourceHelper.safe_delete(@proposer)
|
8
8
|
ResourceHelper.safe_delete(@proposed)
|
9
9
|
@proposer.create
|
@@ -22,8 +22,31 @@ describe 'Partnership' do
|
|
22
22
|
@partnership.privacy_level = CyberCoach::PrivacyLevel::REGISTERED_USER
|
23
23
|
end
|
24
24
|
|
25
|
+
it 'should instantiate itself with preset attributes' do
|
26
|
+
uri = '/pants/'
|
27
|
+
id = 1
|
28
|
+
proposer = CyberCoach::User.new
|
29
|
+
proposed = CyberCoach::User.new
|
30
|
+
privacy_level = CyberCoach::PrivacyLevel::OWNER
|
31
|
+
pants = 'yes'
|
32
|
+
@partnership = CyberCoach::Partnership.new(
|
33
|
+
uri: uri,
|
34
|
+
id: id,
|
35
|
+
proposer: proposer,
|
36
|
+
proposed: proposed,
|
37
|
+
privacy_level: privacy_level,
|
38
|
+
pants: pants
|
39
|
+
)
|
40
|
+
expect(@partnership.uri).to be(uri)
|
41
|
+
expect(@partnership.id).to be(id)
|
42
|
+
expect(@partnership.proposer).to be(proposer)
|
43
|
+
expect(@partnership.proposed).to be(proposed)
|
44
|
+
expect(@partnership.privacy_level).to be(privacy_level)
|
45
|
+
expect { @partnership.pants }.to raise_error(NoMethodError)
|
46
|
+
end
|
47
|
+
|
25
48
|
it 'should raise an error if it does not exist' do
|
26
|
-
expect { @partnership.read(
|
49
|
+
expect { @partnership.read(@proposer.authentication) }.to raise_error(CyberCoach::HttpError)
|
27
50
|
end
|
28
51
|
|
29
52
|
it 'should read all' do
|
@@ -35,21 +58,21 @@ describe 'Partnership' do
|
|
35
58
|
|
36
59
|
describe 'crud' do
|
37
60
|
before(:example) do
|
38
|
-
ResourceHelper.safe_delete(@partnership,
|
61
|
+
ResourceHelper.safe_delete(@partnership, @proposer.authentication)
|
39
62
|
end
|
40
63
|
|
41
64
|
after(:example) do
|
42
|
-
ResourceHelper.safe_delete(@partnership,
|
65
|
+
ResourceHelper.safe_delete(@partnership, @proposer.authentication)
|
43
66
|
end
|
44
67
|
|
45
68
|
it 'should create itself' do
|
46
|
-
@partnership.create(
|
69
|
+
@partnership.create(@proposer.authentication)
|
47
70
|
expect(@partnership.id).not_to be_nil
|
48
71
|
end
|
49
72
|
|
50
73
|
it 'should read itself' do
|
51
|
-
@partnership.create(
|
52
|
-
@partnership.read(
|
74
|
+
@partnership.create(@proposer.authentication)
|
75
|
+
@partnership.read(@proposer.authentication)
|
53
76
|
expect(@partnership.id).not_to be_nil
|
54
77
|
expect(@partnership.uri).not_to be_nil
|
55
78
|
expect(@partnership.proposer.uri).to eq(@proposer.uri)
|
@@ -61,19 +84,64 @@ describe 'Partnership' do
|
|
61
84
|
end
|
62
85
|
|
63
86
|
it 'should update itself' do
|
64
|
-
@partnership.create(
|
87
|
+
@partnership.create(@proposer.authentication)
|
65
88
|
old_privacy_level = @partnership.privacy_level
|
66
89
|
new_privacy_level = CyberCoach::PrivacyLevel::EVERYBODY
|
67
90
|
@partnership.privacy_level = new_privacy_level
|
68
|
-
@partnership.update(
|
91
|
+
@partnership.update(@proposer.authentication)
|
69
92
|
expect(@partnership.privacy_level).not_to eq(old_privacy_level)
|
70
93
|
expect(@partnership.privacy_level).to eq(new_privacy_level)
|
71
94
|
end
|
72
95
|
|
73
96
|
it 'should delete itself' do
|
74
|
-
@partnership.create(
|
75
|
-
@partnership.delete(
|
76
|
-
expect { @partnership.read(
|
97
|
+
@partnership.create(@proposer.authentication)
|
98
|
+
@partnership.delete(@proposer.authentication)
|
99
|
+
expect { @partnership.read(@proposer.authentication) }.to raise_error(CyberCoach::HttpError)
|
100
|
+
end
|
101
|
+
end
|
102
|
+
|
103
|
+
describe 'invalidation' do
|
104
|
+
before(:example) do
|
105
|
+
ResourceHelper.safe_delete(@partnership, @proposer.authentication)
|
106
|
+
end
|
107
|
+
|
108
|
+
after(:example) do
|
109
|
+
ResourceHelper.safe_delete(@partnership, @proposer.authentication)
|
110
|
+
end
|
111
|
+
|
112
|
+
it 'should not invalidate when creating' do
|
113
|
+
proposer = @partnership.proposer
|
114
|
+
@partnership.proposer = CyberCoach::User.new
|
115
|
+
expect(@partnership.proposer).not_to eq(proposer)
|
116
|
+
expect { @partnership.create(@proposer.authentication, false) }.not_to raise_error
|
117
|
+
@partnership.proposer = proposer
|
118
|
+
end
|
119
|
+
|
120
|
+
it 'should not invalidate when reading' do
|
121
|
+
@partnership.create(@proposer.authentication)
|
122
|
+
proposer = @partnership.proposer
|
123
|
+
@partnership.proposer = CyberCoach::User.new
|
124
|
+
expect(@partnership.proposer).not_to eq(proposer)
|
125
|
+
expect { @partnership.read(@proposer.authentication, false) }.not_to raise_error
|
126
|
+
@partnership.proposer = proposer
|
127
|
+
end
|
128
|
+
|
129
|
+
it 'should not invalidate when updating' do
|
130
|
+
@partnership.create(@proposer.authentication)
|
131
|
+
proposer = @partnership.proposer
|
132
|
+
@partnership.proposer = CyberCoach::User.new
|
133
|
+
expect(@partnership.proposer).not_to eq(proposer)
|
134
|
+
expect { @partnership.update(@proposer.authentication, false) }.not_to raise_error
|
135
|
+
@partnership.proposer = proposer
|
136
|
+
end
|
137
|
+
|
138
|
+
it 'should not invalidate when deleting' do
|
139
|
+
@partnership.create(@proposer.authentication)
|
140
|
+
proposer = @partnership.proposer
|
141
|
+
@partnership.proposer = CyberCoach::User.new
|
142
|
+
expect(@partnership.proposer).not_to eq(proposer)
|
143
|
+
expect { @partnership.delete(@proposer.authentication, false) }.not_to raise_error
|
144
|
+
@partnership.proposer = proposer
|
77
145
|
end
|
78
146
|
end
|
79
|
-
end
|
147
|
+
end
|
@@ -20,6 +20,33 @@ describe 'ResourcePage' do
|
|
20
20
|
end
|
21
21
|
end
|
22
22
|
|
23
|
+
it 'should need :type to instantiate' do
|
24
|
+
expect { CyberCoach::ResourcePage.new }.to raise_error(ArgumentError)
|
25
|
+
end
|
26
|
+
|
27
|
+
it 'should instantiate itself with preset attributes' do
|
28
|
+
uri = '/pants/'
|
29
|
+
type = CyberCoach::User
|
30
|
+
start = 1
|
31
|
+
end_ = 6
|
32
|
+
size = 5
|
33
|
+
pants = 'yes'
|
34
|
+
@page = CyberCoach::ResourcePage.new(
|
35
|
+
uri: uri,
|
36
|
+
type: type,
|
37
|
+
start: start,
|
38
|
+
end: end_,
|
39
|
+
size: size,
|
40
|
+
pants: pants
|
41
|
+
)
|
42
|
+
expect(@page.uri).to be(uri)
|
43
|
+
expect(@page.type).to be(type)
|
44
|
+
expect(@page.start).to be(start)
|
45
|
+
expect(@page.end).to be(end_)
|
46
|
+
expect(@page.size).to be(size)
|
47
|
+
expect { @page.pants }.to raise_error(NoMethodError)
|
48
|
+
end
|
49
|
+
|
23
50
|
it 'should read itself' do
|
24
51
|
@page.start = 1
|
25
52
|
@page.size = 2
|
@@ -29,8 +56,20 @@ describe 'ResourcePage' do
|
|
29
56
|
expect(@page.end).to eq(3)
|
30
57
|
end
|
31
58
|
|
59
|
+
it 'should not invalidate when reading' do
|
60
|
+
start = @page.start
|
61
|
+
size = @page.size
|
62
|
+
@page.start = 5
|
63
|
+
@page.size = 6
|
64
|
+
expect(@page.size).not_to eq(size)
|
65
|
+
expect(@page.start).not_to eq(start)
|
66
|
+
@page.read({}, false)
|
67
|
+
expect(@page.size).to eq(size)
|
68
|
+
expect(@page.start).to eq(start)
|
69
|
+
end
|
70
|
+
|
32
71
|
it 'should be able to navigate between pages' do
|
33
|
-
expect{@page.previous}.to raise_error(CyberCoach::ResourcePage::NoPreviousPageError)
|
72
|
+
expect { @page.previous }.to raise_error(CyberCoach::ResourcePage::NoPreviousPageError)
|
34
73
|
next_page = @page.next
|
35
74
|
expect(next_page.resources).not_to be_empty
|
36
75
|
expect(next_page.start).to eq(@page.end)
|
@@ -41,4 +80,4 @@ describe 'ResourcePage' do
|
|
41
80
|
next_previous_page = next_page.previous
|
42
81
|
expect(next_previous_page.resources[0].uri).to eq(@page.resources[0].uri)
|
43
82
|
end
|
44
|
-
end
|
83
|
+
end
|
@@ -5,6 +5,26 @@ describe 'Sport' do
|
|
5
5
|
@sport = CyberCoach::Sport.new
|
6
6
|
end
|
7
7
|
|
8
|
+
it 'should instantiate itself with preset attributes' do
|
9
|
+
uri = '/pants/'
|
10
|
+
id = 1
|
11
|
+
name = 'pants'
|
12
|
+
description = 'very fancy'
|
13
|
+
pants = 'yes'
|
14
|
+
@sport = CyberCoach::Sport.new(
|
15
|
+
uri: uri,
|
16
|
+
id: id,
|
17
|
+
name: name,
|
18
|
+
description: description,
|
19
|
+
pants: pants
|
20
|
+
)
|
21
|
+
expect(@sport.uri).to be(uri)
|
22
|
+
expect(@sport.id).to be(id)
|
23
|
+
expect(@sport.name).to be(name)
|
24
|
+
expect(@sport.description).to be(description)
|
25
|
+
expect { @sport.pants }.to raise_error(NoMethodError)
|
26
|
+
end
|
27
|
+
|
8
28
|
it 'should read itself' do
|
9
29
|
@sport.name = 'Running'
|
10
30
|
@sport.read
|
@@ -15,15 +35,25 @@ describe 'Sport' do
|
|
15
35
|
expect(@sport.subscriptions).not_to be_empty
|
16
36
|
end
|
17
37
|
|
38
|
+
it 'should not invalidate when reading' do
|
39
|
+
@sport.name = 'Running'
|
40
|
+
@sport.read
|
41
|
+
name = @sport.name
|
42
|
+
@sport.name = 'notTheName'
|
43
|
+
expect(@sport.name).not_to eq(name)
|
44
|
+
expect { @sport.read({}, false) }.not_to raise_error
|
45
|
+
@sport.name = name
|
46
|
+
end
|
47
|
+
|
18
48
|
it 'should raise an error if it does not exist' do
|
19
49
|
@sport.name = 'Pants'
|
20
|
-
expect{@sport.read}.to raise_error(CyberCoach::HttpError)
|
50
|
+
expect { @sport.read }.to raise_error(CyberCoach::HttpError)
|
21
51
|
end
|
22
52
|
|
23
53
|
it 'should read all' do
|
24
54
|
sports = CyberCoach::Sport.read_all
|
25
55
|
expect(sports.resources.size).to eq(4)
|
26
|
-
expect{sports.next}.to raise_error(CyberCoach::ResourcePage::NoNextPageError)
|
27
|
-
expect{sports.previous}.to raise_error(CyberCoach::ResourcePage::NoPreviousPageError)
|
56
|
+
expect { sports.next }.to raise_error(CyberCoach::ResourcePage::NoNextPageError)
|
57
|
+
expect { sports.previous }.to raise_error(CyberCoach::ResourcePage::NoPreviousPageError)
|
28
58
|
end
|
29
|
-
end
|
59
|
+
end
|