Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F5494027
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
Wed, Sep 30, 1:44 PM
Size
845 B
Mime Type
text/x-ruby
Expires
Fri, Oct 2, 1:44 PM (1 d, 5 m)
Engine
blob
Format
Raw Data
Handle
455778
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