canvas-lms/spec/factories
Brad Horrocks 3fee901ac0 Remove Google Docs plugin
Google drive relevant code has been moved to the gems/google_drive
Actually test google drive with mocked api responses
cleaned up lots of code

Fixes PLAT-1301

Test Plan:
*** You'll need to use 2 separate google accounts to fully test ***
** Its helpful to have multiple chrome profiles so you dont have to log in and
** out a bunch https://support.google.com/chrome/answer/2364824?hl=en

BEFORE SWITCHING TO THIS PATCH SET
  - Make sure you have some google doc collaborations
    - Directions for creating one are below
  - Disable your google docs plugin

Switch to the patch set
Enable google drive. (if not already)
  - You should be able to paste in a client_secrets.json
  - Update Redirect URI to point to your local instance (The URI should exist in the JSON)

As an admin/teacher
  - Goto `profile/settings` and add the google drive user service
    - Your email should be displayed with the service
  - Goto Collaborations
    - Make sure existing collaborations still work
    - Click "Start new collaboration"
    - give it a nice name (Created by admin)
    - select your student
    - click start collaborating
    - You should be redirected to the new doc in google
    - create another collaboration without the student (Created by admin, no users)
  - Create an assignment with
    Submission Type: Online
    Online Entry Options: File Uploads
  - Make sure your student has access to the course/assignment
  - Goto Account settings -> Users
    - Click View User Groups in the top right
    - create a new group set with a group in it
    - add yourself and your student to the group
  - Goto the Group's Collaborations (Courses & Groups -> [group name] -> Collaborations)
    - Click "Start new collaboration"
    - give it a nice name (Created by admin for group)
    - select your student
    - click start collaborating
    - You should be redirected to the new doc in google

As a student
  - Goto `profile/settings` and add the google drive user service
    - Your email should be displayed with the service
  - Goto the assignment
    - Submit the assignment
    - You should have a "Google Doc" tab
    - Choose a document and submit it
    - After it submitted, click download on the right side
      just to make sure its correct
  - Goto Collaborations
    - Make sure existing collaborations still work
    - make sure the "created by admin" collaboration works
    - make sure you can't see "Created by admin, no users"
    - Click "Start new collaboration"
    - give it a nice name (created by a student)
    - click start collaborating
    - You should be redirected to the new doc in google
    - Switch to your admin/teacher and make sure they can't access it
    - Edit the collaboration add the teacher, click Save
    - Switch to your admin/teacher and make sure they can access it
  - Goto `profile/settings` and REMOVE the google drive user service
  - Go back to collaborations
  - You should be forced to add the google service in order to use a collaboration
  - Goto the Group's Collaborations (Courses & Groups -> [group name] -> Collaborations)
    - Make sure you can access "Created by admin for group"
    - Click "Start new collaboration"
    - select your admin/teacher
    - click start collaborating
    - You should be redirected to the new doc in google
    - make sure your admin can access it to

As a site admin
  - Disable Google Drive
  - Then with your student
    - Make sure you can still do file upload submissions on the assignment
    - Collaborations should no longer show up (unless you have etherpad enabled)
  - Google drive should no longer show up in your profile settings as a registered service
Change-Id: I4dfaff6f5262743c044aadd12266fd0bd85a60e1
Reviewed-on: https://gerrit.instructure.com/69078
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-02-01 23:41:53 +00:00
..
account_factory.rb have spec factories use new UI if ENV['CANVAS_FORCE_USE_NEW_STYLES'] 2015-09-28 16:28:56 +00:00
account_notification_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
announcement_factory.rb api for the activity stream, closes #4740 2011-08-23 09:13:20 -06:00
assessment_question_bank_factory.rb Allow outcome result details for Quiz alignments 2016-01-27 23:48:03 +00:00
assessment_question_factory.rb validate nullness in the db on a bunch of columns 2013-09-12 22:20:39 +00:00
assessment_request.rb Adds peer review notification for assigning peer reviewers 2014-07-25 19:56:57 +00:00
assignment_factory.rb filter assignments by overrides when necessary 2015-08-20 15:37:12 +00:00
assignment_override_factory.rb spec: spec for differentiated assignments 2014-12-03 21:47:56 +00:00
attachment_factory.rb rails 4.2: misc spec fixes 2016-01-18 21:45:39 +00:00
bookmark_service_factory.rb prepare for foreign keys refs #6895 2012-05-10 09:46:05 -06:00
calendar_event_factory.rb scheduler: allow sub_context selection on multiple contexts 2012-05-30 17:52:21 -06:00
collaboration_factory.rb Remove Google Docs plugin 2016-02-01 23:41:53 +00:00
communication_channel_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
conversation_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
course_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
course_section_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
custom_data_factory.rb add serializable hash of CustomData for User models 2014-03-24 21:52:43 +00:00
delayed_message_factory.rb set locale for summary message creation 2015-10-20 20:14:19 +00:00
discussion_topic_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
enrollment_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
eportfolio_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
external_feed_factory.rb cleanup and prevent duplicate external feeds 2015-02-13 17:35:34 +00:00
folder_factory.rb Initial commit. 2011-01-31 18:57:29 -07:00
grading_period_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
grading_standard_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
group_category_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
group_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
group_membership_factory.rb group join/leave/invite api 2012-06-08 17:26:14 -06:00
media_object_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
message_factory.rb check all models for protecting attributes refs #3847 2011-05-25 17:38:50 -06:00
notification_factory.rb remove body, sms_body columns from notifications. 2013-02-22 16:07:21 -07:00
notification_policy_factory.rb fix spec failures for notifications 2014-01-15 18:33:26 +00:00
outcome_factory.rb Assignment_rubrics: Added and refactored specs for assignments_rubrics_spec.rb 2015-08-13 20:45:48 +00:00
page_view_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
pseudonym_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
pseudonym_session_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
quiz_factory.rb Allow outcome result details for Quiz alignments 2016-01-27 23:48:03 +00:00
role_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
rubric_assessment_factory.rb replace association with association_object in models 2014-01-24 16:35:40 +00:00
rubric_association_factory.rb allow students who are also account admins to peer review 2015-02-13 17:32:50 +00:00
rubric_factory.rb move factories out of spec_helper 2015-07-16 15:29:29 +00:00
scribd_mime_type_factory.rb remove scribd 2014-09-11 18:42:15 +00:00
submission_comment_factory.rb allow anonymous peer reviews; respect anonymity for reviewers 2015-03-23 19:24:32 +00:00
submission_factory.rb spec: speed up some submission-related specs 2013-11-19 19:17:56 +00:00
user_factory.rb rails 4.2: misc spec fixes 2016-01-18 21:45:39 +00:00
user_service_factory.rb prepare for foreign keys refs #6895 2012-05-10 09:46:05 -06:00
wiki_page_factory.rb display module progression links on group assignment discussions 2012-02-21 12:44:33 -07:00