forked from capability-boosters-dev/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.
Populate root account id for favorites
Test plan: -specs should pass -create a favorite -inspect in rails console -verify root account id is set Fixes VICE-343 flag=none Change-Id: Ib13b7db057bfe1fd7a1d78b30a5ed3a30ae85799 Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/239853 Tested-by: Service Cloud Jenkins <[email protected]> Reviewed-by: Ben Nelson <[email protected]> QA-Review: Caleb Guanzon <[email protected]> Product-Review: Caleb Guanzon <[email protected]>
- Loading branch information
1 parent
fe42ebf
commit 68422b7
Showing
3 changed files
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# | ||
# Copyright (C) 2020 - 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/>. | ||
|
||
require 'spec_helper' | ||
|
||
describe Favorite do | ||
it 'should populate root account' do | ||
student_in_course() | ||
favorite = @user.favorites.create!(context: @course) | ||
expect(favorite.root_account).to eq @course.root_account | ||
end | ||
end |