spec/api/uploads_api_spec.rb in phrase-2.26.0 vs spec/api/uploads_api_spec.rb in phrase-3.0.0

- old
+ new

@@ -27,11 +27,11 @@ # @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] :locale_id Locale of the file's content. Can be the name or id of the locale. Preferred is 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. @@ -51,10 +51,10 @@ 'Content-Type' => 'application/json' }) end it 'should work' do - @api_instance.upload_create('project_id', file: File.new('Gemfile')) + @api_instance.upload_create('project_id', File.new('Gemfile'), "yml", "en") expect(a_request(:post, 'https://api.phrase.com/v2/projects/project_id/uploads') .with { |req| expect(req.headers['Content-Type']).to eq('multipart/form-data') # expect(req.body).to include('Gemfile')