has_token_id 0.4.2 → 0.4.3
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.
- checksums.yaml +4 -4
- data/.travis.yml +0 -1
- data/lib/has_token_id/finder_methods.rb +6 -0
- data/lib/has_token_id/version.rb +1 -1
- data/test/unit/finder_methods_test.rb +15 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2434c3ca123b2c8cf8d6f8c41e91e16f4675ac52
|
4
|
+
data.tar.gz: 84d2fbcd1af6be0913ead86d16cd8b91ce5494f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 386d303806fc383c46d3a187eb2bd47af5ebdc37e85d4ebd5ccd6cee1303f70c293e015323fcd9475f84ed07542bc764f2722f00ca62cd731ae47970c81046d5
|
7
|
+
data.tar.gz: 7cdf6aae79b897a4ace1cf90460dda57f3235740f75f402ce1830149a112014275af72d2952052ee35fc8f6d88c9ae293a7f3be62df8c19b1c18e6cd662bc34d
|
data/.travis.yml
CHANGED
data/lib/has_token_id/version.rb
CHANGED
@@ -97,4 +97,19 @@ class FinderMethodsTest < MiniTest::Should::TestCase
|
|
97
97
|
end
|
98
98
|
|
99
99
|
end
|
100
|
+
|
101
|
+
context "#find!" do
|
102
|
+
|
103
|
+
should "find record" do
|
104
|
+
assert_equal @item, Item.find!(@item.id)
|
105
|
+
end
|
106
|
+
|
107
|
+
should "raise active record not found when record is nil" do
|
108
|
+
assert_raises ActiveRecord::RecordNotFound do
|
109
|
+
Item.find!("test")
|
110
|
+
end
|
111
|
+
end
|
112
|
+
|
113
|
+
end
|
114
|
+
|
100
115
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_token_id
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Spencer Steffen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|