mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-08 23:18:18 -07:00
adding more authentication, fixing category bug
This commit is contained in:
parent
60a2982724
commit
42fd3edbae
10 changed files with 28 additions and 93 deletions
|
|
@ -23,6 +23,7 @@ RSpec.describe QuestionsController, type: :controller do
|
|||
# This should return the minimal set of attributes required to create a valid
|
||||
# Question. As you add validations to Question, be sure to
|
||||
# adjust the attributes here as well.
|
||||
let!(:user) { User.create(email: 'test@test.com', password: '123456') }
|
||||
let (:category) { Category.create!(name: 'Category') }
|
||||
let(:valid_attributes) {
|
||||
{
|
||||
|
|
@ -45,6 +46,10 @@ RSpec.describe QuestionsController, type: :controller do
|
|||
# QuestionsController. Be sure to keep this updated too.
|
||||
let(:valid_session) { {} }
|
||||
|
||||
before :each do
|
||||
sign_in user
|
||||
end
|
||||
|
||||
describe "GET #index" do
|
||||
it "assigns all questions as @questions" do
|
||||
question = Question.create! valid_attributes
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue