traka 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -5
- data/lib/traka/change.rb +8 -0
- data/lib/traka/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +1190 -0
- data/test/traka_change_test.rb +21 -0
- metadata +2 -2
data/test/traka_change_test.rb
CHANGED
@@ -226,6 +226,27 @@ class TrakaChangeTest < ActiveSupport::TestCase
|
|
226
226
|
assert_equal Traka::Change.changes(:actions => [:create, :update], :filter => false, :only => [Product, Cheese]).map(&:action_type), ["create", "create", "update", "update"]
|
227
227
|
end
|
228
228
|
|
229
|
+
test "TrakaChange can handle invalid version Fixnum" do
|
230
|
+
p = Product.create(:name => "Product A")
|
231
|
+
c = Cheese.create(:name => "Cheese A")
|
232
|
+
|
233
|
+
assert_equal Traka::Change.changes(:version => 4).count, 0
|
234
|
+
end
|
235
|
+
|
236
|
+
test "TrakaChange can handle invalid version Range" do
|
237
|
+
p = Product.create(:name => "Product A")
|
238
|
+
c = Cheese.create(:name => "Cheese A")
|
239
|
+
|
240
|
+
assert_equal Traka::Change.changes(:version => (4..6)).count, 0
|
241
|
+
end
|
242
|
+
|
243
|
+
test "TrakaChange can handle invalid version inverted Range" do
|
244
|
+
p = Product.create(:name => "Product A")
|
245
|
+
c = Cheese.create(:name => "Cheese A")
|
246
|
+
|
247
|
+
assert_equal Traka::Change.changes(:version => (4..0)).count, 0
|
248
|
+
end
|
249
|
+
|
229
250
|
test "TrakaChange can resolve AR objects" do
|
230
251
|
p = Product.create(:name => "Product A")
|
231
252
|
c = Cheese.create(:name => "Cheese A")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: traka
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-13 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|