actv 2.10.3 → 2.10.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 064377c8f5c426c2ece5f03ee146eaf2ff877e2f
4
- data.tar.gz: 3107c24b8d74176b0c6c782bf84fb6b5de04f79b
3
+ metadata.gz: 55c88c17c63b10181b8a35f05e531ffbddaa8c28
4
+ data.tar.gz: 87bd4de570957919a559ff3672580cb46d0cbebc
5
5
  SHA512:
6
- metadata.gz: 8ef7db8e559e59082c67b1e6a8a5f854a83c30b1bf91ed646f46f0908fac23b5696c7fac084bf938d9bff3035929c1cfd980600553364b654f868f0ece0a4e78
7
- data.tar.gz: 30947eea7da2427d741d0e3e7ed118d00ffef45807105cab06a698beba6087606fc09db851d4d2f48b2903eb5ccf406fea97855a7a2fdf9a90ffd36c2e684ab7
6
+ metadata.gz: 2f2736832dc34099aeedea6c39f78ab2fd3fc08e675e735b1b63368ef675639fd289dbe74410eaa3aa2d6032d7eb8521a0543bfb5beeba5da627426045ac2386
7
+ data.tar.gz: ec1a37dd4b19b1b4a0b47d87fad327fed310ae3525e15259f2e2e8423b77a7793acf4db865d906ff262a46e28324bd1b7906240a005dd21e5407cfe946dd73ee
@@ -16,7 +16,7 @@ module ACTV
16
16
 
17
17
  def online_registration_available?
18
18
  if is_present?(self.registrationUrlAdr)
19
- if is_present?(self.legacy_data) && is_present?(self.legacy_data.onlineRegistration)
19
+ if is_present?(self.legacy_data) && is_present?(self.legacy_data.onlineRegistration.to_s)
20
20
  self.legacy_data.onlineRegistration.to_s.downcase == 'true'
21
21
  else
22
22
  true
@@ -1,3 +1,3 @@
1
1
  module ACTV
2
- VERSION = "2.10.3"
2
+ VERSION = "2.10.4"
3
3
  end
@@ -49,50 +49,64 @@ describe ACTV::Event do
49
49
  end
50
50
 
51
51
  describe '#online_registration_available?' do
52
- context 'when online_registration_available is true' do
53
- before do
54
- subject.legacy_data.stub(:onlineRegistration).and_return("true")
55
- subject.stub(:registrationUrlAdr).and_return("something")
56
- end
52
+ context "when registrationUrlAdr is present" do
53
+ before { subject.stub(:registrationUrlAdr).and_return("something") }
57
54
 
58
- its(:online_registration_available?) { should be_true }
59
- end
55
+ context "when legacy_data is present" do
56
+ context "when online_registration field is string value 'true'" do
57
+ before { subject.legacy_data.stub(:onlineRegistration).and_return("true") }
58
+ its(:online_registration_available?) { should be_true }
59
+ end
60
60
 
61
- context "when online_registration_available is not true" do
62
- before do
63
- subject.legacy_data.stub(:onlineRegistration).and_return("false")
64
- subject.stub(:registrationUrlAdr).and_return("something")
65
- end
61
+ context 'when online_registration field is bool value true' do
62
+ before { subject.legacy_data.stub(:onlineRegistration).and_return(true) }
63
+ its(:online_registration_available?) { should be_true }
64
+ end
66
65
 
67
- its(:online_registration_available?) { should be_false }
68
- end
66
+ context "when online_registration field is string value 'false'" do
67
+ before { subject.legacy_data.stub(:onlineRegistration).and_return("false") }
68
+ its(:online_registration_available?) { should be_false }
69
+ end
69
70
 
70
- context "when online_registration_available is not present" do
71
- before do
72
- subject.legacy_data.stub(:onlineRegistration).and_return(nil)
73
- end
71
+ context "when online_registration field is bool value false" do
72
+ before { subject.legacy_data.stub(:onlineRegistration).and_return(false) }
73
+ its(:online_registration_available?) { should be_false }
74
+ end
74
75
 
75
- context "when registrationUrlAdr is present" do
76
- before { subject.stub(:registrationUrlAdr).and_return("something") }
77
- its(:online_registration_available?) { should be_true }
76
+ context "when online_registration field is blank" do
77
+ before { subject.legacy_data.stub(:onlineRegistration).and_return('') }
78
+ its(:online_registration_available?) { should be_true }
79
+ end
80
+
81
+ context "when online_registration field is not present" do
82
+ before { subject.legacy_data.stub(:onlineRegistration).and_return(nil) }
83
+ its(:online_registration_available?) { should be_true }
84
+ end
78
85
  end
79
86
 
80
- context "when registrationUrlAdr is not present" do
81
- before { subject.stub(:registrationUrlAdr).and_return(nil) }
82
- its(:online_registration_available?) { should be_false }
87
+ context "when legacy_data is not present" do
88
+ before { subject.stub(:legacy_data).and_return(nil) }
89
+ its(:online_registration_available?) { should be_true }
83
90
  end
84
91
  end
85
92
 
86
- context "when legacy_data is not present" do
87
- before { subject.stub(:legacy_data).and_return(nil) }
93
+ context "when registrationUrlAdr is not present" do
94
+ before { subject.stub(:registrationUrlAdr).and_return(nil) }
88
95
 
89
- context "when registrationUrlAdr is present" do
90
- before { subject.stub(:registrationUrlAdr).and_return("something") }
91
- its(:online_registration_available?) { should be_true }
96
+ context "when legacy_data is present" do
97
+ context "when online_registration field is true" do
98
+ before { subject.legacy_data.stub(:onlineRegistration).and_return(true) }
99
+ its(:online_registration_available?) { should be_false }
100
+ end
101
+
102
+ context "when online_registration field is false" do
103
+ before { subject.legacy_data.stub(:onlineRegistration).and_return(false) }
104
+ its(:online_registration_available?) { should be_false }
105
+ end
92
106
  end
93
107
 
94
- context "when registrationUrlAdr is not present" do
95
- before { subject.stub(:registrationUrlAdr).and_return(nil) }
108
+ context "when legacy_data is not present" do
109
+ before { subject.stub(:legacy_data).and_return(nil) }
96
110
  its(:online_registration_available?) { should be_false }
97
111
  end
98
112
  end
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.3
4
+ version: 2.10.4
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-04 00:00:00.000000000 Z
11
+ date: 2017-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -407,7 +407,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
407
407
  version: '0'
408
408
  requirements: []
409
409
  rubyforge_project:
410
- rubygems_version: 2.4.6
410
+ rubygems_version: 2.5.1
411
411
  signing_key:
412
412
  specification_version: 4
413
413
  summary: Active API