require 'spec_helper' require 'json' # Unit tests for Phrase::UploadsApi # Automatically generated by openapi-generator (https://openapi-generator.tech) # Please update as you see appropriate describe 'UploadsApi' do before do # run before each test @api_instance = Phrase::UploadsApi.new end after do # run after each test end describe 'test an instance of UploadsApi' do it 'should create an instance of UploadsApi' do expect(@api_instance).to be_instance_of(Phrase::UploadsApi) end end # unit tests for upload_create # Upload a new file # Upload a new language file. Creates necessary resources in your project. # @param project_id Project ID # @param [Hash] opts the optional parameters # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) # @option opts [String] :branch specify the branch to use # @option opts [File] :file File to be imported # @option opts [String] :file_format File format. Auto-detected when possible and not specified. # @option opts [String] :locale_id Locale of the file's content. Can be the name or public id of the locale. Preferred is the public id. # @option opts [String] :tags List of tags separated by comma to be associated with the new keys contained in the upload. # @option opts [Boolean] :update_translations Indicates whether existing translations should be updated with the file content. # @option opts [Boolean] :update_descriptions Existing key descriptions will be updated with the file content. Empty descriptions overwrite existing descriptions. # @option opts [Boolean] :convert_emoji This option is obsolete. Providing the option will cause a bad request error. # @option opts [Boolean] :skip_upload_tags Indicates whether the upload should not create upload tags. # @option opts [Boolean] :skip_unverification Indicates whether the upload should unverify updated translations. # @option opts [String] :file_encoding Enforces a specific encoding on the file contents. Valid options are \\\"UTF-8\\\", \\\"UTF-16\\\" and \\\"ISO-8859-1\\\". # @option opts [Object] :locale_mapping Optional, format specific mapping between locale names and the columns the translations to those locales are contained in. # @option opts [Object] :format_options Additional options available for specific formats. See our format guide for complete list. # @option opts [Boolean] :autotranslate If set, translations for the uploaded language will be fetched automatically. # @option opts [Boolean] :mark_reviewed Indicated whether the imported translations should be marked as reviewed. This setting is available if the review workflow (currently beta) is enabled for the project. # @return [Upload] describe 'upload_create test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for upload_show # View upload details # View details and summary for a single upload. # @param project_id Project ID # @param id ID # @param [Hash] opts the optional parameters # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) # @option opts [String] :branch specify the branch to use # @return [Upload] describe 'upload_show test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end # unit tests for uploads_list # List uploads # List all uploads for the given project. # @param project_id Project ID # @param [Hash] opts the optional parameters # @option opts [String] :x_phrase_app_otp Two-Factor-Authentication token (optional) # @option opts [Integer] :page Page number # @option opts [Integer] :per_page Limit on the number of objects to be returned, between 1 and 100. 25 by default # @option opts [String] :branch specify the branch to use # @return [Array] describe 'uploads_list test' do it 'should work' do # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers end end end