mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
moved comment instance into before block
This commit is contained in:
parent
f3996a9bff
commit
1fb1071feb
1 changed files with 1 additions and 3 deletions
|
|
@ -24,10 +24,10 @@ describe Admin::CommentsController, type: :controller do
|
|||
context 'logged in as admin, organizer or cfp' do
|
||||
before :each do
|
||||
sign_in(organizer)
|
||||
comment
|
||||
end
|
||||
describe 'GET #index' do
|
||||
it 'populates a hash with comments' do
|
||||
comment
|
||||
get :index
|
||||
expect(assigns(:comments)).to be_a(Hash)
|
||||
# assigns(:comments).first returns an array of first pair key-value from hash.
|
||||
|
|
@ -35,12 +35,10 @@ describe Admin::CommentsController, type: :controller do
|
|||
expect(assigns(:comments).first.first.title).to eq(comment.commentable.conference.title)
|
||||
end
|
||||
it 'has status 200: OK' do
|
||||
comment
|
||||
get :index
|
||||
expect(response).to have_http_status(:ok)
|
||||
end
|
||||
it 'renders the :index template' do
|
||||
comment
|
||||
get :index
|
||||
expect(response).to render_template(:index)
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue