Eliminate double subject call in admin/ controller specs (#28158)
This commit is contained in:
parent
8710bdb183
commit
b751078fcd
3 changed files with 16 additions and 16 deletions
|
@ -12,24 +12,24 @@ describe Admin::CustomEmojisController do
|
|||
end
|
||||
|
||||
describe 'GET #index' do
|
||||
subject { get :index }
|
||||
|
||||
before do
|
||||
Fabricate(:custom_emoji)
|
||||
end
|
||||
|
||||
it 'renders index page' do
|
||||
expect(subject).to have_http_status 200
|
||||
expect(subject).to render_template :index
|
||||
get :index
|
||||
|
||||
expect(response).to have_http_status 200
|
||||
expect(response).to render_template :index
|
||||
end
|
||||
end
|
||||
|
||||
describe 'GET #new' do
|
||||
subject { get :new }
|
||||
|
||||
it 'renders new page' do
|
||||
expect(subject).to have_http_status 200
|
||||
expect(subject).to render_template :new
|
||||
get :new
|
||||
|
||||
expect(response).to have_http_status 200
|
||||
expect(response).to render_template :new
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue