add root account id to instfs preflight json
closes RECNVS-38 test plan: none (this commit will be tested as a part of RECNVS-39) Change-Id: I39c39974c8f9553af5057e159c419cd84397caf8 Reviewed-on: https://gerrit.instructure.com/136940 Tested-by: Jenkins Reviewed-by: Jacob Fugal <jacob@instructure.com> QA-Review: Collin Parrish <cparrish@instructure.com> Product-Review: Andrew Huff <ahuff@instructure.com>
This commit is contained in:
parent
705a113b7a
commit
13c2d0b7d2
|
@ -55,6 +55,7 @@ module InstFS
|
|||
context_id: context.global_id.to_s,
|
||||
user_id: user.global_id.to_s,
|
||||
folder_id: folder && folder.global_id.to_s,
|
||||
root_account_id: context.account.root_account.global_id.to_s,
|
||||
quota_exempt: !!quota_exempt,
|
||||
on_duplicate: on_duplicate)
|
||||
|
||||
|
|
|
@ -110,7 +110,7 @@ describe InstFS do
|
|||
end
|
||||
|
||||
context "upload_preflight_json" do
|
||||
let(:context) { instance_double("Course", id: 1, global_id: 101) }
|
||||
let(:context) { instance_double("Course", id: 1, global_id: 101, account: Account.default) }
|
||||
let(:user) { instance_double("User", id: 2, global_id: 102) }
|
||||
let(:folder) { instance_double("Folder", id: 3, global_id: 103) }
|
||||
let(:filename) { 'test.txt' }
|
||||
|
@ -181,6 +181,10 @@ describe InstFS do
|
|||
expect(capture_params['folder_id']).to eq folder.global_id.to_s
|
||||
end
|
||||
|
||||
it "include the root_account_id" do
|
||||
expect(capture_params['root_account_id']).to eq context.account.root_account.global_id.to_s
|
||||
end
|
||||
|
||||
it "include the quota_exempt flag" do
|
||||
expect(capture_params['quota_exempt']).to eq quota_exempt
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue