Simplify setting up admin component tests

This commit is contained in:
Javi Martín
2023-07-02 01:59:50 +02:00
parent 62304b50e0
commit b8ed81c5b8
16 changed files with 23 additions and 27 deletions

View File

@@ -1,8 +1,6 @@
require "rails_helper"
describe Admin::Poll::Questions::TableActionsComponent, controller: Admin::BaseController do
before { sign_in(create(:administrator).user) }
describe Admin::Poll::Questions::TableActionsComponent, :admin do
it "displays the edit and destroy actions when the poll has not started" do
question = create(:poll_question, poll: create(:poll, :future))