advert_selector 1.0.1 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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: 21
4
+ hash: 19
5
5
  prerelease:
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
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-21 00:00:00 Z
18
+ date: 2012-10-22 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: rails