Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F5131699
job_template_spec.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
Mon, Aug 17, 2:41 PM
Size
706 B
Mime Type
text/x-ruby
Expires
Wed, Aug 19, 2:41 PM (1 h, 26 m)
Engine
blob
Format
Raw Data
Handle
431957
Attached To
rARCHIVING archiving
job_template_spec.rb
View Options
require
'spec_helper'
describe
JobTemplate
do
describe
'#to_bacula_config_array'
do
let
(
:job_template
)
{
FactoryGirl
.
create
(
:job_template
)
}
subject
{
job_template
.
to_bacula_config_array
}
it
'has a Job structure'
do
expect
(
subject
.
first
)
.
to
eq
(
'Job {'
)
expect
(
subject
.
last
)
.
to
eq
(
'}'
)
end
JobTemplate
::
DEFAULT_OPTIONS
.
each
do
|
k
,
v
|
it
"assigns
#{
k
.
capitalize
}
param"
do
expect
(
subject
)
.
to
include
(
"
#{
k
.
capitalize
}
=
#{
v
}
"
)
end
end
end
context
'when no job_type is given'
do
let
(
:job_template
)
{
FactoryGirl
.
create
(
:job_template
)
}
it
'sets the job_type to :backup'
do
expect
(
job_template
)
.
to
be_backup
end
end
end
Event Timeline
Log In to Comment