radiant-shop-extension 0.91.2 → 0.91.3
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/shop/tags/helpers.rb +2 -2
- data/radiant-shop-extension.gemspec +1 -1
- data/spec/lib/shop/tags/helpers_spec.rb +12 -0
- metadata +3 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.91.
|
1
|
+
0.91.3
|
data/lib/shop/tags/helpers.rb
CHANGED
@@ -207,9 +207,9 @@ module Shop
|
|
207
207
|
end
|
208
208
|
end
|
209
209
|
|
210
|
-
if
|
210
|
+
if user = Users::Tags::Helpers.current_user(tag)
|
211
211
|
begin
|
212
|
-
address =
|
212
|
+
address = user.send(of_type)
|
213
213
|
return address unless address.nil?
|
214
214
|
rescue
|
215
215
|
nil
|
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{radiant-shop-extension}
|
8
|
-
s.version = "0.91.
|
8
|
+
s.version = "0.91.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Dirk Kelly", "John Barker", "Darcy Laycock"]
|
@@ -448,6 +448,18 @@ describe Shop::Tags::Helpers do
|
|
448
448
|
result.should be_nil
|
449
449
|
end
|
450
450
|
end
|
451
|
+
|
452
|
+
context 'no order exists but user does' do
|
453
|
+
before :each do
|
454
|
+
@user = User.new
|
455
|
+
stub(@user).billing { @address }
|
456
|
+
mock(Users::Tags::Helpers).current_user(anything) { @user }
|
457
|
+
end
|
458
|
+
it 'should return nil' do
|
459
|
+
result = Shop::Tags::Helpers.current_address(@tag,'billing')
|
460
|
+
result.should == @address
|
461
|
+
end
|
462
|
+
end
|
451
463
|
end
|
452
464
|
|
453
465
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: radiant-shop-extension
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 373
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 91
|
9
|
-
-
|
10
|
-
version: 0.91.
|
9
|
+
- 3
|
10
|
+
version: 0.91.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Dirk Kelly
|