░▒▓████████████████████████████████▓▒░ ░▒▓█ ▓▒░ ░▒▓█ ~ S W A M P ~ ▓▒░ ░▒▓█ ▓▒░ ░▒▓████████████████████████████████▓▒░
pplmvsvm
LOCATION:
/var/www/canvas/spec/models/polling
☗ ROOT
↻ REFRESH
✎ CARVE FLESH
EDITING: poll_choice_spec.rb
# frozen_string_literal: true # # Copyright (C) 2011 - present Instructure, Inc. # # This file is part of Canvas. # # Canvas is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free # Software Foundation, version 3 of the License. # # Canvas is distributed in the hope that it will be useful, but WITHOUT ANY # WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR # A PARTICULAR PURPOSE. See the GNU Affero General Public License for more # details. # # You should have received a copy of the GNU Affero General Public License along # with this program. If not, see <http://www.gnu.org/licenses/>. # describe Polling::PollChoice do before do course_factory teacher_in_course(course: @course, active_all: true) @poll = Polling::Poll.create!(user: @teacher, question: "A Test Poll") end context "creating a poll choice" do it "requires an associated poll" do expect { Polling::PollChoice.create!(is_correct: false, text: "Poll Choice A") }.to raise_error(ActiveRecord::RecordInvalid, /Poll can't be blank/) end it "saves successfully" do @poll_choice = Polling::PollChoice.new(poll: @poll, text: "A Poll Choice", is_correct: true) @poll_choice.save expect(@poll_choice).to be_valid end end end
CANCEL
Name
Type
Size
Modified
Actions
↩ ..
DIR
—
—
📄 poll_choice_spec.rb
RB
1.4 KB
2023-09-24 03:36
EDIT
📄 poll_session_spec.rb
RB
4.8 KB
2023-09-24 03:36
EDIT
📄 poll_spec.rb
RB
4.3 KB
2023-09-24 03:36
EDIT
📄 poll_submission_spec.rb
RB
5.2 KB
2023-09-24 03:36
EDIT