Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F4044960
record_test.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Sat, Jul 18, 8:17 AM
Size
485 B
Mime Type
text/x-ruby
Expires
Mon, Jul 20, 8:17 AM (1 d, 13 h)
Engine
blob
Format
Raw Data
Handle
377094
Attached To
rWEBDNS WebDNS (edet4)
record_test.rb
View Options
require
'test_helper'
class
RecordTest
<
ActiveSupport
::
TestCase
[
'text'
,
-
1
,
0
,
2_147_483_647
+
1
].
each
{
|
ttl
|
test
"ttl invalid
#{
ttl
}
"
do
rec
=
build
(
:a
,
ttl
:
ttl
)
rec
.
valid?
assert_not_empty
rec
.
errors
[
:ttl
]
,
"ttl
#{
ttl
}
should be invalid!"
end
}
[
''
,
1
,
2_147_483_647
].
each
{
|
ttl
|
test
"ttl valid
#{
ttl
}
"
do
rec
=
build
(
:a
,
ttl
:
ttl
)
rec
.
valid?
assert_empty
rec
.
errors
[
:ttl
]
,
"ttl
#{
ttl
}
should be valid!"
end
}
end
Event Timeline
Log In to Comment