advert_selector 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/advert_selector/banner.rb +1 -1
- data/lib/advert_selector/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +2632 -0
- data/test/dummy/tmp/cache/943/570/advert_selector_errors +0 -0
- data/test/dummy/tmp/cache/A2C/760/AdvertSelectorBanner_207249520 +0 -0
- data/test/dummy/tmp/cache/A3E/CF0/AdvertSelectorBanner_394627963 +0 -0
- data/test/dummy/tmp/cache/A3F/BF0/AdvertSelectorBanner_814558298 +0 -0
- data/test/unit/advert_selector/banner_test.rb +8 -0
- metadata +4 -4
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -101,6 +101,14 @@ module AdvertSelector
|
|
101
101
|
@coke.reload
|
102
102
|
@coke.target_view_count = nil
|
103
103
|
assert @coke.show_today_has_viewcounts?(1), "should be true if no target viewcount"
|
104
|
+
|
105
|
+
Timecop.travel( Time.now.at_midnight + 19.hours ) do
|
106
|
+
@coke.reload
|
107
|
+
@coke.update_attributes!(:start_time => 1.hour.ago, :end_time => 10.days.from_now.at_beginning_of_day,
|
108
|
+
:target_view_count => 100)
|
109
|
+
@coke.running_view_count = 0
|
110
|
+
assert @coke.show_today_has_viewcounts?(), "should be true for the first day even if start is later in the evening"
|
111
|
+
end
|
104
112
|
end
|
105
113
|
|
106
114
|
test "show_now_basic? for default banners" do
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: advert_selector
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 2
|
10
|
+
version: 1.0.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Olli Huotari
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-10-
|
18
|
+
date: 2012-10-22 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: rails
|