Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F907012
spf_text.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, Aug 30, 12:33 PM
Size
657 B
Mime Type
text/x-ruby
Expires
Mon, Sep 1, 12:33 PM (20 h, 20 m)
Engine
blob
Format
Raw Data
Handle
253763
Attached To
rWEBDNS WebDNS (edet4)
spf_text.rb
View Options
require
'test_helper'
class
SPFTest
<
ActiveSupport
::
TestCase
test
'saves'
do
rec
=
build
(
:spf
)
rec
.
valid?
assert_empty
rec
.
errors
assert
rec
.
save
end
[
'""'
,
'"The quick brown fox"'
].
each
{
|
spf
|
test
"valid content
#{
spf
}
"
do
rec
=
build
(
:spf
,
content
:
spf
)
rec
.
valid?
assert_empty
rec
.
errors
[
:content
]
,
"
#{
spf
.
inspect
}
should be valid!"
end
}
[
''
,
'"'
,
'no quotes'
,
].
each
{
|
spf
|
test
"invalid content
#{
spf
}
"
do
rec
=
build
(
:spf
,
content
:
spf
)
rec
.
valid?
assert_not_empty
rec
.
errors
[
:content
]
,
"
#{
spf
.
inspect
}
should be invalid!"
end
}
end
Event Timeline
Log In to Comment