shareprogress 0.0.1 → 0.0.2

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: a7ff16026620a0a3a79d334f2686ca529b5d63d9
4
- data.tar.gz: 49943db011437445cb7043cbff330379502b1ec3
3
+ metadata.gz: 271e9682aa7a81d6fb0f52678aaab0cbef3cc5a1
4
+ data.tar.gz: f3823bff697e54d4a06eb3b619823ae9a6dbe211
5
5
  SHA512:
6
- metadata.gz: e942769c2221619479cd1e6fa38d0623268b2a330a96bea62f7e6dc512caf243acc62259dceebc5b0e9f7777174d901bbddb5db37cc3b2fa18309d280e57122b
7
- data.tar.gz: f08502dce4e30f60338a2598226dd263361b7c179861625326842ab5049ea400fb997895671d6a52d69e067807728663cd48273d7453a525fe1b202299236f59
6
+ metadata.gz: b6497fb1519499b7fda95195d70017a626f24a009c712e33f4b5f89a4bcaf2207a15b5597b441e0f48544703986dd6035aae598db0dc27100d71f857ebb678b4
7
+ data.tar.gz: 158264c71e812c69ce7f189de57eada2ce5be4406f16dc4fe8284136b1cb6f41d891b7c38bd59a99d91b235ce36cec8bb6633016843c9aa0d8703b6a9cb14f5c
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  .DS_Store
2
2
  .gs
3
+ shareprogress-0.0.1.gem
@@ -5,6 +5,7 @@ class NewButton < Scrivener
5
5
  def validate
6
6
  assert_present :key
7
7
  assert_url :page_url
8
+ assert_present :page_title
8
9
 
9
10
  assert_member :button_template, %w{sp_em_small sp_em_large sp_tw_small
10
11
  sp_tw_large sp_fb_small sp_fb_large}
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "shareprogress"
3
- s.version = "0.0.1"
3
+ s.version = "0.0.2"
4
4
  s.summary = "Ruby gem to communicate with ShareProgress API"
5
5
  s.description = s.summary
6
6
  s.authors = ["Cecilia Rivero"]
@@ -147,7 +147,7 @@ scope do
147
147
  end
148
148
 
149
149
  # key
150
- test "create button with no key" do |data|
150
+ test "create button with nil key" do |data|
151
151
  data["key"] = nil
152
152
 
153
153
  result = ShareProgress::Button.create(data)
@@ -157,8 +157,18 @@ scope do
157
157
  assert result == expected_result
158
158
  end
159
159
 
160
+ test "create button with empty key" do |data|
161
+ data["key"] = ""
162
+
163
+ result = ShareProgress::Button.create(data)
164
+
165
+ expected_result = {:key=>[:not_present]}
166
+
167
+ assert result == expected_result
168
+ end
169
+
160
170
  # page_url
161
- test "create button with no page_url" do |data|
171
+ test "create button with nil page_url" do |data|
162
172
  data["page_url"] = nil
163
173
 
164
174
  result = ShareProgress::Button.create(data)
@@ -168,6 +178,39 @@ scope do
168
178
  assert result == expected_result
169
179
  end
170
180
 
181
+ # page_url
182
+ test "create button with empty page_url" do |data|
183
+ data["page_url"] = ""
184
+
185
+ result = ShareProgress::Button.create(data)
186
+
187
+ expected_result = {:page_url=>[:not_url]}
188
+
189
+ assert result == expected_result
190
+ end
191
+
192
+ # page_title
193
+ test "create button with nil page_title" do |data|
194
+ data["page_title"] = nil
195
+
196
+ result = ShareProgress::Button.create(data)
197
+
198
+ expected_result = {:page_title=>[:not_present]}
199
+
200
+ assert result == expected_result
201
+ end
202
+
203
+ # page_title
204
+ test "create button with empty page_title" do |data|
205
+ data["page_title"] = ""
206
+
207
+ result = ShareProgress::Button.create(data)
208
+
209
+ expected_result = {:page_title=>[:not_present]}
210
+
211
+ assert result == expected_result
212
+ end
213
+
171
214
  # button_template
172
215
  test "create button with nil button_template" do |data|
173
216
  data["button_template"] = nil
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shareprogress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cecilia Rivero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-19 00:00:00.000000000 Z
11
+ date: 2015-03-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: requests