-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds '/2/files/create_folder_batch' endpoint #60
Adds '/2/files/create_folder_batch' endpoint #60
Conversation
@client.create_folder_batch(["/Create Batch 4", "/Create Batch 5"], { :async => true }) | ||
}.to raise_error(ArgumentError) | ||
end | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/TrailingBlankLines: Final newline missing.
|
||
it "raises error, when invalid option is passed", :cassette => "create_folder_batch/invalid_option" do | ||
expect { | ||
@client.create_folder_batch(["/Create Batch 4", "/Create Batch 5"], { :async => true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Style/BracesAroundHashParameters: Redundant curly braces around a hash parameter.
Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
Metrics/LineLength: Line is too long. [93/80]
end | ||
|
||
it "raises error, when invalid option is passed", :cassette => "create_folder_batch/invalid_option" do | ||
expect { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/BlockDelimiters: Avoid using {...} for multi-line blocks.
expect(result).not_to include(a_kind_of(DropboxApi::Errors::FolderConflictError)) | ||
end | ||
|
||
it "raises error, when invalid option is passed", :cassette => "create_folder_batch/invalid_option" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
Metrics/LineLength: Line is too long. [104/80]
it "when autorename is true, does not return error for repeated entries", :cassette => "create_folder_batch/autorename_true" do | ||
result = @client.create_folder_batch(["/Create Batch 1", "/Create Batch 1"], { :autorename => true }) | ||
|
||
expect(result).not_to include(a_kind_of(DropboxApi::Errors::FolderConflictError)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Metrics/LineLength: Line is too long. [85/80]
expect(async_result).to have_key("async_job_id") | ||
end | ||
|
||
it "returns async_job_id when force_async is true", :cassette => "create_folder_batch/force_async_true" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
Metrics/LineLength: Line is too long. [108/80]
|
||
async_result = @client.create_folder_batch(paths) | ||
expect(async_result).to be_a(Hash) | ||
expect(async_result).to have_key("async_job_id") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
|
||
it "returns async_job_id when large entries are passed", :cassette => "create_folder_batch/large_entries" do | ||
paths = [] | ||
100.times { |i| paths << "/Folder #{i}"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Layout/SpaceInsideBlockBraces: Space missing inside }.
expect(result.last).to be_a(DropboxApi::Metadata::Folder) | ||
end | ||
|
||
it "returns async_job_id when large entries are passed", :cassette => "create_folder_batch/large_entries" do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
Style/HashSyntax: Use the new Ruby 1.9 hash syntax.
Metrics/LineLength: Line is too long. [110/80]
end | ||
|
||
it "returns the created folders synchronously", :cassette => "create_folder_batch/synchronous_result_success" do | ||
result = @client.create_folder_batch ["/Create Batch", "/Create Batch 1"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols.
ENDPOINT: https://www.dropbox.com/developers/documentation/http/documentation#files-create_folder_batch