forked from instructure/canvas-lms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
spec: mocha => rspec-mocks for plugins
Change-Id: Icc0d1d279544cb811c919ff593795e39ba67b16b Reviewed-on: https://gerrit.instructure.com/119985 Tested-by: Jenkins Reviewed-by: Simon Williams <[email protected]> Product-Review: Cody Cutrer <[email protected]> QA-Review: Cody Cutrer <[email protected]>
- Loading branch information
Showing
9 changed files
with
48 additions
and
48 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -928,8 +928,8 @@ def create_some_group_memberships_n_stuff() | |
@user = user_with_managed_pseudonym(active_all: true, account: @root, name: 'Jimmy John', | ||
username: '[email protected]', sis_user_id: 'other_shard') | ||
end | ||
@account.stubs(:trusted_account_ids).returns([@account.id, @root.id]) | ||
@account.stubs(:trust_exists?).returns(true) | ||
allow(@account).to receive(:trusted_account_ids).and_return([@account.id, @root.id]) | ||
allow(@account).to receive(:trust_exists?).and_return(true) | ||
@course1.enroll_user(@user) | ||
|
||
parameters = {} | ||
|
@@ -1198,7 +1198,7 @@ def create_some_group_memberships_n_stuff() | |
@uo1 = @user2.user_observees.create_or_restore(user_id: @user1) | ||
uo2 = @user4.user_observees.create_or_restore(user_id: @user3) | ||
@user7.user_observees.create_or_restore(user_id: @user6) | ||
UserObserver.where(id: [@uo1.id, uo2.id]).update_all(sis_batch_id: @sis) | ||
UserObserver.where(id: [@uo1.id, uo2.id]).update_all(sis_batch_id: @sis.id) | ||
end | ||
|
||
it 'should run user_observer provisioning report' do | ||
|
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -251,8 +251,8 @@ def mock_migration.export_content | |
self.workflow_state = 'imported' | ||
self.migration_settings[:imported_assets] = ["quizzes:quiz_xyz"] | ||
end | ||
ContentMigration.stubs(:new).returns(mock_migration) | ||
ContentMigration.stubs(:find).with(mock_migration.id).returns(mock_migration) | ||
allow(ContentMigration).to receive(:new).and_return(mock_migration) | ||
allow(ContentMigration).to receive(:find).with(mock_migration.id).and_return(mock_migration) | ||
|
||
status, details, context, item_id = soap_request( | ||
'PublishServerItem', '[email protected]', 'asdfasdf', context, | ||
|
@@ -279,8 +279,8 @@ def mock_migration.export_content | |
def @mock_migration.export_content | ||
self.workflow_state = 'importing' | ||
end | ||
ContentMigration.stubs(:new).returns(@mock_migration) | ||
ContentMigration.stubs(:find).with(@mock_migration.id).returns(@mock_migration) | ||
allow(ContentMigration).to receive(:new).and_return(@mock_migration) | ||
allow(ContentMigration).to receive(:find).with(@mock_migration.id).and_return(@mock_migration) | ||
|
||
status, details, context, item_id = soap_request( | ||
'PublishServerItem', '[email protected]', 'asdfasdf', context, | ||
|
This file contains 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