Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F462836
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
Mon, May 19, 12:14 AM
Size
845 B
Mime Type
text/x-ruby
Expires
Wed, May 21, 12:14 AM (11 h, 48 m)
Engine
blob
Format
Raw Data
Handle
220444
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