Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F1431497
clients_controller_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
Sun, Jan 18, 5:33 PM
Size
845 B
Mime Type
text/x-ruby
Expires
Tue, Jan 20, 5:33 PM (1 d, 20 h)
Engine
blob
Format
Raw Data
Handle
325916
Attached To
rARCHIVING archiving
clients_controller_spec.rb
View Options
require
'spec_helper'
describe
ClientsController
do
describe
'GET #index'
do
let!
(
:job
)
{
FactoryGirl
.
create
(
:job
)
}
let!
(
:running_job
)
{
FactoryGirl
.
create
(
:job
,
:running
)
}
before
{
get
:index
}
it
'fetches clients'
do
expect
(
assigns
(
:clients
))
.
to
be
end
it
'fetches hosts'
do
expect
(
assigns
(
:hosts
))
.
to
be
end
it
'fetches active jobs'
do
expect
(
assigns
(
:active_jobs
))
.
to
eq
(
Hash
[
running_job
.
client_id
,
1
]
)
end
it
'renders'
do
expect
(
response
)
.
to
render_template
(
:index
)
end
end
describe
'GET #show'
do
let
(
:client
)
{
FactoryGirl
.
create
(
:client
)
}
before
{
get
:show
,
id
:
client
.
id
}
it
'fetches client'
do
expect
(
assigns
(
:client
))
.
to
eq
(
client
)
end
it
'renders'
do
expect
(
response
)
.
to
render_template
(
:show
)
end
end
end
Event Timeline
Log In to Comment