actv 2.10.1 → 2.10.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/actv/event.rb +4 -0
- data/lib/actv/version.rb +1 -1
- data/spec/actv/event_spec.rb +15 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 19961b331311fe391695e5fa077c77ba9bb8c826
|
4
|
+
data.tar.gz: 6b4ea77341d2c1bb16e7a9e55ce74a4aa7612eb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 25cf1ebfb43c0f68cc3338cb28c0196dc186bb0c4fe92d1de10ccee948f0fcab81bb454fd36fbf6f375bfec9f810869e95e44dc10296bdd3f1e7c1a77bb09af1
|
7
|
+
data.tar.gz: b2511e1f4f35429f4a51d3b72b5a90666ba3c0d7feceac75881c621b5acdfc48f6667d48def17305fa0c974b25cbdc601dbdb394988b776175b9e0417c78e9a0
|
data/lib/actv/event.rb
CHANGED
@@ -10,6 +10,10 @@ module ACTV
|
|
10
10
|
ACTV::EventValidator.new(response).valid?
|
11
11
|
end
|
12
12
|
|
13
|
+
def course_map
|
14
|
+
@course_map ||= tag_by_description 'coursemap'
|
15
|
+
end
|
16
|
+
|
13
17
|
def online_registration_available?
|
14
18
|
if is_present?(self.registrationUrlAdr)
|
15
19
|
if is_present?(self.legacy_data) && is_present?(self.legacy_data.onlineRegistration)
|
data/lib/actv/version.rb
CHANGED
data/spec/actv/event_spec.rb
CHANGED
@@ -33,6 +33,21 @@ describe ACTV::Event do
|
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
36
|
+
describe '#course_map' do
|
37
|
+
let(:map_file) { 'https://commuserui-vip.qa.aw.dev.activenetwork.com/sys/filedownload/0/CourseMap_15260251_1469500165160' }
|
38
|
+
let(:response) { {assetGuid: 1, assetTags: [{tag: {tagId: '1801633', tagName: map_file, tagDescription: 'coursemap'}}]} }
|
39
|
+
subject(:event) { ACTV::Event.new response }
|
40
|
+
|
41
|
+
context 'when coursemap tag exists' do
|
42
|
+
its(:course_map) { should eq map_file }
|
43
|
+
end
|
44
|
+
|
45
|
+
context 'when coursemap tag does not exists' do
|
46
|
+
let(:response) { {assetGuid: 1} }
|
47
|
+
its(:course_map) { should be_nil }
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
36
51
|
describe '#online_registration_available?' do
|
37
52
|
context 'when online_registration_available is true' do
|
38
53
|
before do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actv
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.10.
|
4
|
+
version: 2.10.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathaniel Barnes
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|