Created
July 14, 2010 18:51
-
-
Save knowuh/475849 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Here are tests which charlie worked on: | |
spec/controllers/admin/projects_controller_spec.rb | |
describe "GET index for managers" do | |
describe "GET edit for managers" do | |
it "doesn't allow anybody who isn't an admin or manager to access to index" do | |
it "only allows managers to edit the current project and only shows them the information they can change" do | |
it "assigns the requested project as @admin_project" do | |
it "uses default content if home_page_content is empty" do | |
it "uses the value of home_page_content if it is not empty" do | |
it "renders the _form_for_managers partial" do | |
spec/controllers/home_controller_spec.rb | |
it "should display home page content from the current admin project" do | |
spec/controllers/portal/clazzes_controller_spec.rb | |
describe Portal::ClazzesController do | |
describe "GET show" do | |
describe "XMLHttpRequest edit" do | |
describe "conditions for a user trying to remove a teacher from a class" do | |
describe "POST add_teacher" do | |
describe "DELETE remove_teacher" do | |
describe "GET new" do | |
describe "POST create" do | |
it "assigns the requested class as @portal_clazz" do | |
it "shows the full class summary, with edit button if current user is authorized" do | |
it "shows the list of all teachers assigned to the requested class" do | |
it "shows the details of all teachers assigned to the requested class with removal links" do | |
it "should not allow me to modify the requested class's school" do | |
it "the user is allowed to remove any teacher in the list" do | |
it "the user is not allowed to edit this class in the first place" do | |
it "this teacher is the last teacher assigned to this class" do | |
# it "this teacher is the current user" do | |
it "this teacher is the current user" do | |
it "populates the list of available teachers for ADD functionality if current user is authorized" do | |
it "will add the selected teacher to the given class if the current user is authorized" do | |
it "will remove the selected teacher from the given class if the current user is authorized" do | |
it "will not let me remove the last teacher from the given class" do | |
it "will disable the remaining delete button if there is only one remaining teacher after this operation" do | |
it "will re-render the teacher listing when a teacher is removed" do | |
it "will redirect the user to their home page if they remove themselves from a class" do | |
it "should show a list of the current teacher's schools to which to assign this class" do | |
it "should show a check box for each possible site grade level" do | |
it "should populate the schools list with the project default school if the current user does not belong to any schools" do | |
it "should create a new class, assigned to the correct teacher, in the correct school" do | |
it "should attach this class to the appropriate course in the specified school, if one exists" do | |
it "should create a new course in the specified school if this class has a unique name" do | |
it "should create exactly one teacher object for the current user if the current user does not already have one" do | |
it "should not let me create a class with no school" do | |
it "should assign the specified grade levels to the new class" do | |
it "should not let me create a class with no grade levels" do | |
spec/controllers/portal/students_controller_spec.rb | |
describe Portal::StudentsController do | |
describe "POST create" do | |
describe "security questions" do | |
it "creates a user and a student when given valid parameters" do | |
it "does not create a user or a student when given invalid parameters" do | |
it "creates security questions when given valid parameters" do | |
it "does not create a user or a student when given bad security questions" do | |
it "does not check for security questions when they are not enabled in the project" do | |
it "does not check for security questions when a teacher creates a student" do | |
it "checks for security questions when a student signs themselves up" do | |
spec/controllers/portal/teachers_controller_spec.rb | |
describe Portal::TeachersController do | |
describe "POST create" do | |
it "should create a user and a teacher if all fields are valid" do | |
it "should not allow the teacher not to select a school" do | |
spec/controllers/security_questions_controller_spec.rb | |
describe SecurityQuestionsController do | |
describe "GET edit" do | |
describe "PUT update" do | |
it "fills in the form with the student's current security questions, if any" do | |
it "updates the user's security questions" do | |
it "redirects the user to their home page once they set their security questions" do | |
it "does not accept invalid question values" do | |
spec/controllers/sessions_controller_spec.rb | |
describe "Student login" do | |
describe "Student with security questions" do | |
describe "Student without security questions" do | |
it "should not check for security questions if the user is not a student" do | |
it "should not check for security questions if the current Admin::Project says not to" do | |
it "should allow the student to log in normally" do | |
it "should redirect to the page where the student must set their security questions" do | |
spec/models/portal/clazzes_spec.rb | |
describe "asking if a user is allowed to remove a teacher from a clazz instance" do | |
describe "creating a new class" do | |
it "under normal circumstances should say there is no reason admins cannot remove teachers" do | |
it "under normal circumstances should say there is no reason authorized teachers cannot remove teachers" do | |
it "should say it is illegal for an unauthorized user to remove a teacher" do | |
it "should say it is illegal for a user to remove the last teacher" do | |
it "should require a school" do | |
it "should require at least one teacher" do | |
spec/models/portal/teacher_clazz_spec.rb | |
it "should remove this teacher from the specified class" do | |
spec/models/portal/teacher_spec.rb | |
it "virtual teachers should have virtual classes" do | |
it "teachers with real clazzes shouldn't be able to change them" do | |
it "virtual teachers class should not be real" do | |
it "Teachers in virtual schools should be able to change their clazzes" do | |
spec/models/security_question_spec.rb | |
describe SecurityQuestion do | |
describe "self.fill_array" do | |
describe "self.make_questions_from_hash_and_user" do | |
describe "self.errors_for_questions_list!" do | |
describe "question index" do | |
describe "form options" do | |
it "makes a new set of questions according to provided information" do | |
it "uses information from the user's existing security questions, if appropriate" do | |
it "does not accept the same question twice" do | |
it "does not accept fewer than three questions" do | |
it "does not accept empty answers" do | |
spec/models/user_spec.rb | |
describe "security questions" do | |
it "updates security questions" do |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment