cloudmersive-convert-api-client 1.3.3 → 1.3.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (190) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +10 -4
  3. data/cloudmersive-convert-api-client.gemspec +1 -1
  4. data/docs/ConvertDocumentApi.md +112 -2
  5. data/docs/ConvertImageApi.md +63 -2
  6. data/docs/ConvertWebApi.md +2 -2
  7. data/docs/MergeDocumentApi.md +58 -0
  8. data/docs/MultipageImageFormatConversionResult.md +10 -0
  9. data/docs/PageConversionResult.md +9 -0
  10. data/lib/cloudmersive-convert-api-client.rb +3 -1
  11. data/lib/cloudmersive-convert-api-client/api/compare_document_api.rb +1 -1
  12. data/lib/cloudmersive-convert-api-client/api/convert_data_api.rb +1 -1
  13. data/lib/cloudmersive-convert-api-client/api/convert_document_api.rb +116 -4
  14. data/lib/cloudmersive-convert-api-client/api/convert_image_api.rb +71 -3
  15. data/lib/cloudmersive-convert-api-client/api/convert_template_api.rb +1 -1
  16. data/lib/cloudmersive-convert-api-client/api/convert_web_api.rb +4 -4
  17. data/lib/cloudmersive-convert-api-client/api/edit_document_api.rb +1 -1
  18. data/lib/cloudmersive-convert-api-client/api/merge_document_api.rb +64 -1
  19. data/lib/cloudmersive-convert-api-client/api/validate_document_api.rb +1 -1
  20. data/lib/cloudmersive-convert-api-client/api/viewer_tools_api.rb +1 -1
  21. data/lib/cloudmersive-convert-api-client/api_client.rb +1 -1
  22. data/lib/cloudmersive-convert-api-client/api_error.rb +1 -1
  23. data/lib/cloudmersive-convert-api-client/configuration.rb +1 -1
  24. data/lib/cloudmersive-convert-api-client/models/alternate_file_format_candidate.rb +1 -1
  25. data/lib/cloudmersive-convert-api-client/models/autodetect_get_info_result.rb +1 -1
  26. data/lib/cloudmersive-convert-api-client/models/converted_png_page.rb +1 -1
  27. data/lib/cloudmersive-convert-api-client/models/document_validation_error.rb +1 -1
  28. data/lib/cloudmersive-convert-api-client/models/document_validation_result.rb +1 -1
  29. data/lib/cloudmersive-convert-api-client/models/docx_body.rb +1 -1
  30. data/lib/cloudmersive-convert-api-client/models/docx_cell_style.rb +1 -1
  31. data/lib/cloudmersive-convert-api-client/models/docx_footer.rb +1 -1
  32. data/lib/cloudmersive-convert-api-client/models/docx_header.rb +1 -1
  33. data/lib/cloudmersive-convert-api-client/models/docx_image.rb +1 -1
  34. data/lib/cloudmersive-convert-api-client/models/docx_insert_image_request.rb +1 -1
  35. data/lib/cloudmersive-convert-api-client/models/docx_insert_image_response.rb +1 -1
  36. data/lib/cloudmersive-convert-api-client/models/docx_paragraph.rb +1 -1
  37. data/lib/cloudmersive-convert-api-client/models/docx_remove_object_request.rb +1 -1
  38. data/lib/cloudmersive-convert-api-client/models/docx_remove_object_response.rb +1 -1
  39. data/lib/cloudmersive-convert-api-client/models/docx_run.rb +1 -1
  40. data/lib/cloudmersive-convert-api-client/models/docx_section.rb +1 -1
  41. data/lib/cloudmersive-convert-api-client/models/docx_set_footer_request.rb +1 -1
  42. data/lib/cloudmersive-convert-api-client/models/docx_set_footer_response.rb +1 -1
  43. data/lib/cloudmersive-convert-api-client/models/docx_set_header_request.rb +1 -1
  44. data/lib/cloudmersive-convert-api-client/models/docx_set_header_response.rb +1 -1
  45. data/lib/cloudmersive-convert-api-client/models/docx_style.rb +1 -1
  46. data/lib/cloudmersive-convert-api-client/models/docx_table.rb +1 -1
  47. data/lib/cloudmersive-convert-api-client/models/docx_table_cell.rb +1 -1
  48. data/lib/cloudmersive-convert-api-client/models/docx_table_row.rb +1 -1
  49. data/lib/cloudmersive-convert-api-client/models/docx_text.rb +1 -1
  50. data/lib/cloudmersive-convert-api-client/models/exif_value.rb +1 -1
  51. data/lib/cloudmersive-convert-api-client/models/finish_editing_request.rb +1 -1
  52. data/lib/cloudmersive-convert-api-client/models/get_docx_body_request.rb +1 -1
  53. data/lib/cloudmersive-convert-api-client/models/get_docx_body_response.rb +1 -1
  54. data/lib/cloudmersive-convert-api-client/models/get_docx_headers_and_footers_request.rb +1 -1
  55. data/lib/cloudmersive-convert-api-client/models/get_docx_headers_and_footers_response.rb +1 -1
  56. data/lib/cloudmersive-convert-api-client/models/get_docx_images_request.rb +1 -1
  57. data/lib/cloudmersive-convert-api-client/models/get_docx_images_response.rb +1 -1
  58. data/lib/cloudmersive-convert-api-client/models/get_docx_sections_request.rb +1 -1
  59. data/lib/cloudmersive-convert-api-client/models/get_docx_sections_response.rb +1 -1
  60. data/lib/cloudmersive-convert-api-client/models/get_docx_styles_request.rb +1 -1
  61. data/lib/cloudmersive-convert-api-client/models/get_docx_styles_response.rb +1 -1
  62. data/lib/cloudmersive-convert-api-client/models/get_docx_tables_request.rb +1 -1
  63. data/lib/cloudmersive-convert-api-client/models/get_docx_tables_response.rb +1 -1
  64. data/lib/cloudmersive-convert-api-client/models/get_image_info_result.rb +1 -1
  65. data/lib/cloudmersive-convert-api-client/models/get_xlsx_columns_request.rb +1 -1
  66. data/lib/cloudmersive-convert-api-client/models/get_xlsx_columns_response.rb +1 -1
  67. data/lib/cloudmersive-convert-api-client/models/get_xlsx_images_request.rb +1 -1
  68. data/lib/cloudmersive-convert-api-client/models/get_xlsx_images_response.rb +1 -1
  69. data/lib/cloudmersive-convert-api-client/models/get_xlsx_rows_and_cells_request.rb +1 -1
  70. data/lib/cloudmersive-convert-api-client/models/get_xlsx_rows_and_cells_response.rb +1 -1
  71. data/lib/cloudmersive-convert-api-client/models/get_xlsx_styles_request.rb +1 -1
  72. data/lib/cloudmersive-convert-api-client/models/get_xlsx_styles_response.rb +1 -1
  73. data/lib/cloudmersive-convert-api-client/models/get_xlsx_worksheets_request.rb +1 -1
  74. data/lib/cloudmersive-convert-api-client/models/get_xlsx_worksheets_response.rb +1 -1
  75. data/lib/cloudmersive-convert-api-client/models/html_md_result.rb +1 -1
  76. data/lib/cloudmersive-convert-api-client/models/html_template_application_request.rb +1 -1
  77. data/lib/cloudmersive-convert-api-client/models/html_template_application_response.rb +1 -1
  78. data/lib/cloudmersive-convert-api-client/models/html_template_operation.rb +1 -1
  79. data/lib/cloudmersive-convert-api-client/models/html_to_office_request.rb +1 -1
  80. data/lib/cloudmersive-convert-api-client/models/html_to_pdf_request.rb +1 -1
  81. data/lib/cloudmersive-convert-api-client/models/insert_docx_insert_paragraph_request.rb +1 -1
  82. data/lib/cloudmersive-convert-api-client/models/insert_docx_insert_paragraph_response.rb +1 -1
  83. data/lib/cloudmersive-convert-api-client/models/insert_docx_tables_request.rb +1 -1
  84. data/lib/cloudmersive-convert-api-client/models/insert_docx_tables_response.rb +1 -1
  85. data/lib/cloudmersive-convert-api-client/models/insert_xlsx_worksheet_request.rb +1 -1
  86. data/lib/cloudmersive-convert-api-client/models/insert_xlsx_worksheet_response.rb +1 -1
  87. data/lib/cloudmersive-convert-api-client/models/multipage_image_format_conversion_result.rb +208 -0
  88. data/lib/cloudmersive-convert-api-client/models/page_conversion_result.rb +213 -0
  89. data/lib/cloudmersive-convert-api-client/models/pdf_to_png_result.rb +1 -1
  90. data/lib/cloudmersive-convert-api-client/models/remove_docx_headers_and_footers_request.rb +1 -1
  91. data/lib/cloudmersive-convert-api-client/models/remove_docx_headers_and_footers_response.rb +1 -1
  92. data/lib/cloudmersive-convert-api-client/models/replace_string_request.rb +1 -1
  93. data/lib/cloudmersive-convert-api-client/models/screenshot_request.rb +1 -1
  94. data/lib/cloudmersive-convert-api-client/models/viewer_response.rb +1 -1
  95. data/lib/cloudmersive-convert-api-client/models/xlsx_image.rb +1 -1
  96. data/lib/cloudmersive-convert-api-client/models/xlsx_spreadsheet_cell.rb +1 -1
  97. data/lib/cloudmersive-convert-api-client/models/xlsx_spreadsheet_column.rb +1 -1
  98. data/lib/cloudmersive-convert-api-client/models/xlsx_spreadsheet_row.rb +1 -1
  99. data/lib/cloudmersive-convert-api-client/models/xlsx_worksheet.rb +1 -1
  100. data/lib/cloudmersive-convert-api-client/version.rb +2 -2
  101. data/spec/api/compare_document_api_spec.rb +48 -48
  102. data/spec/api/convert_data_api_spec.rb +83 -59
  103. data/spec/api/convert_document_api_spec.rb +227 -203
  104. data/spec/api/convert_image_api_spec.rb +88 -74
  105. data/spec/api/convert_template_api_spec.rb +47 -47
  106. data/spec/api/convert_web_api_spec.rb +95 -95
  107. data/spec/api/edit_document_api_spec.rb +311 -311
  108. data/spec/api/merge_document_api_spec.rb +87 -74
  109. data/spec/api/validate_document_api_spec.rb +71 -71
  110. data/spec/api/viewer_tools_api_spec.rb +47 -47
  111. data/spec/api_client_spec.rb +226 -226
  112. data/spec/configuration_spec.rb +42 -42
  113. data/spec/models/alternate_file_format_candidate_spec.rb +54 -54
  114. data/spec/models/autodetect_get_info_result_spec.rb +60 -60
  115. data/spec/models/converted_png_page_spec.rb +48 -48
  116. data/spec/models/document_validation_error_spec.rb +60 -60
  117. data/spec/models/document_validation_result_spec.rb +60 -60
  118. data/spec/models/docx_body_spec.rb +54 -54
  119. data/spec/models/docx_cell_style_spec.rb +60 -60
  120. data/spec/models/docx_footer_spec.rb +54 -54
  121. data/spec/models/docx_header_spec.rb +54 -54
  122. data/spec/models/docx_image_spec.rb +114 -114
  123. data/spec/models/docx_insert_image_request_spec.rb +78 -78
  124. data/spec/models/docx_insert_image_response_spec.rb +48 -48
  125. data/spec/models/docx_paragraph_spec.rb +60 -60
  126. data/spec/models/docx_remove_object_request_spec.rb +54 -54
  127. data/spec/models/docx_remove_object_response_spec.rb +48 -48
  128. data/spec/models/docx_run_spec.rb +84 -84
  129. data/spec/models/docx_section_spec.rb +48 -48
  130. data/spec/models/docx_set_footer_request_spec.rb +54 -54
  131. data/spec/models/docx_set_footer_response_spec.rb +48 -48
  132. data/spec/models/docx_set_header_request_spec.rb +54 -54
  133. data/spec/models/docx_set_header_response_spec.rb +48 -48
  134. data/spec/models/docx_style_spec.rb +78 -78
  135. data/spec/models/docx_table_cell_spec.rb +84 -84
  136. data/spec/models/docx_table_row_spec.rb +54 -54
  137. data/spec/models/docx_table_spec.rb +270 -270
  138. data/spec/models/docx_text_spec.rb +54 -54
  139. data/spec/models/exif_value_spec.rb +54 -54
  140. data/spec/models/finish_editing_request_spec.rb +42 -42
  141. data/spec/models/get_docx_body_request_spec.rb +48 -48
  142. data/spec/models/get_docx_body_response_spec.rb +48 -48
  143. data/spec/models/get_docx_headers_and_footers_request_spec.rb +48 -48
  144. data/spec/models/get_docx_headers_and_footers_response_spec.rb +54 -54
  145. data/spec/models/get_docx_images_request_spec.rb +48 -48
  146. data/spec/models/get_docx_images_response_spec.rb +48 -48
  147. data/spec/models/get_docx_sections_request_spec.rb +48 -48
  148. data/spec/models/get_docx_sections_response_spec.rb +48 -48
  149. data/spec/models/get_docx_styles_request_spec.rb +48 -48
  150. data/spec/models/get_docx_styles_response_spec.rb +48 -48
  151. data/spec/models/get_docx_tables_request_spec.rb +48 -48
  152. data/spec/models/get_docx_tables_response_spec.rb +48 -48
  153. data/spec/models/get_image_info_result_spec.rb +138 -138
  154. data/spec/models/get_xlsx_columns_request_spec.rb +54 -54
  155. data/spec/models/get_xlsx_columns_response_spec.rb +48 -48
  156. data/spec/models/get_xlsx_images_request_spec.rb +54 -54
  157. data/spec/models/get_xlsx_images_response_spec.rb +48 -48
  158. data/spec/models/get_xlsx_rows_and_cells_request_spec.rb +54 -54
  159. data/spec/models/get_xlsx_rows_and_cells_response_spec.rb +48 -48
  160. data/spec/models/get_xlsx_styles_request_spec.rb +48 -48
  161. data/spec/models/get_xlsx_styles_response_spec.rb +48 -48
  162. data/spec/models/get_xlsx_worksheets_request_spec.rb +48 -48
  163. data/spec/models/get_xlsx_worksheets_response_spec.rb +48 -48
  164. data/spec/models/html_md_result_spec.rb +48 -48
  165. data/spec/models/html_template_application_request_spec.rb +54 -54
  166. data/spec/models/html_template_application_response_spec.rb +48 -48
  167. data/spec/models/html_template_operation_spec.rb +58 -58
  168. data/spec/models/html_to_office_request_spec.rb +42 -42
  169. data/spec/models/html_to_pdf_request_spec.rb +48 -48
  170. data/spec/models/insert_docx_insert_paragraph_request_spec.rb +66 -66
  171. data/spec/models/insert_docx_insert_paragraph_response_spec.rb +48 -48
  172. data/spec/models/insert_docx_tables_request_spec.rb +66 -66
  173. data/spec/models/insert_docx_tables_response_spec.rb +48 -48
  174. data/spec/models/insert_xlsx_worksheet_request_spec.rb +54 -54
  175. data/spec/models/insert_xlsx_worksheet_response_spec.rb +48 -48
  176. data/spec/models/multipage_image_format_conversion_result_spec.rb +54 -0
  177. data/spec/models/page_conversion_result_spec.rb +48 -0
  178. data/spec/models/pdf_to_png_result_spec.rb +48 -48
  179. data/spec/models/remove_docx_headers_and_footers_request_spec.rb +60 -60
  180. data/spec/models/remove_docx_headers_and_footers_response_spec.rb +48 -48
  181. data/spec/models/replace_string_request_spec.rb +66 -66
  182. data/spec/models/screenshot_request_spec.rb +60 -60
  183. data/spec/models/viewer_response_spec.rb +48 -48
  184. data/spec/models/xlsx_image_spec.rb +66 -66
  185. data/spec/models/xlsx_spreadsheet_cell_spec.rb +66 -66
  186. data/spec/models/xlsx_spreadsheet_column_spec.rb +48 -48
  187. data/spec/models/xlsx_spreadsheet_row_spec.rb +48 -48
  188. data/spec/models/xlsx_worksheet_spec.rb +48 -48
  189. data/spec/spec_helper.rb +111 -111
  190. metadata +22 -15
@@ -1,74 +1,87 @@
1
- =begin
2
- #convertapi
3
-
4
- #Convert API lets you effortlessly convert file formats and types.
5
-
6
- OpenAPI spec version: v1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for CloudmersiveConvertApiClient::MergeDocumentApi
17
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
- # Please update as you see appropriate
19
- describe 'MergeDocumentApi' do
20
- before do
21
- # run before each test
22
- @instance = CloudmersiveConvertApiClient::MergeDocumentApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of MergeDocumentApi' do
30
- it 'should create an instance of MergeDocumentApi' do
31
- expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::MergeDocumentApi)
32
- end
33
- end
34
-
35
- # unit tests for merge_document_docx
36
- # Merge Multple Word DOCX Together
37
- # Combine multiple Office Word Documents (docx) into one single Office Word document
38
- # @param input_file1 First input file to perform the operation on.
39
- # @param input_file2 Second input file to perform the operation on (more than 2 can be supplied).
40
- # @param [Hash] opts the optional parameters
41
- # @return [String]
42
- describe 'merge_document_docx test' do
43
- it "should work" do
44
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
- end
46
- end
47
-
48
- # unit tests for merge_document_pptx
49
- # Merge Multple PowerPoint PPTX Together
50
- # Combine multiple Office PowerPoint presentations (pptx) into one single Office PowerPoint presentation
51
- # @param input_file1 First input file to perform the operation on.
52
- # @param input_file2 Second input file to perform the operation on (more than 2 can be supplied).
53
- # @param [Hash] opts the optional parameters
54
- # @return [String]
55
- describe 'merge_document_pptx test' do
56
- it "should work" do
57
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
- end
59
- end
60
-
61
- # unit tests for merge_document_xlsx
62
- # Merge Multple Excel XLSX Together
63
- # Combine multiple Office Excel spreadsheets (xlsx) into a single Office Excel spreadsheet
64
- # @param input_file1 First input file to perform the operation on.
65
- # @param input_file2 Second input file to perform the operation on (more than 2 can be supplied).
66
- # @param [Hash] opts the optional parameters
67
- # @return [String]
68
- describe 'merge_document_xlsx test' do
69
- it "should work" do
70
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
71
- end
72
- end
73
-
74
- end
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for CloudmersiveConvertApiClient::MergeDocumentApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'MergeDocumentApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = CloudmersiveConvertApiClient::MergeDocumentApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of MergeDocumentApi' do
30
+ it 'should create an instance of MergeDocumentApi' do
31
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::MergeDocumentApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for merge_document_docx
36
+ # Merge Multple Word DOCX Together
37
+ # Combine multiple Office Word Documents (docx) into one single Office Word document
38
+ # @param input_file1 First input file to perform the operation on.
39
+ # @param input_file2 Second input file to perform the operation on (more than 2 can be supplied).
40
+ # @param [Hash] opts the optional parameters
41
+ # @return [String]
42
+ describe 'merge_document_docx test' do
43
+ it "should work" do
44
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
45
+ end
46
+ end
47
+
48
+ # unit tests for merge_document_pdf
49
+ # Merge Multple PDF Files Together
50
+ # Combine multiple PDF files (pdf) into a single PDF document, preserving the order of the input documents in the combined document
51
+ # @param input_file1 First input file to perform the operation on.
52
+ # @param input_file2 Second input file to perform the operation on (more than 2 can be supplied).
53
+ # @param [Hash] opts the optional parameters
54
+ # @return [String]
55
+ describe 'merge_document_pdf test' do
56
+ it "should work" do
57
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
58
+ end
59
+ end
60
+
61
+ # unit tests for merge_document_pptx
62
+ # Merge Multple PowerPoint PPTX Together
63
+ # Combine multiple Office PowerPoint presentations (pptx) into one single Office PowerPoint presentation
64
+ # @param input_file1 First input file to perform the operation on.
65
+ # @param input_file2 Second input file to perform the operation on (more than 2 can be supplied).
66
+ # @param [Hash] opts the optional parameters
67
+ # @return [String]
68
+ describe 'merge_document_pptx test' do
69
+ it "should work" do
70
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
71
+ end
72
+ end
73
+
74
+ # unit tests for merge_document_xlsx
75
+ # Merge Multple Excel XLSX Together
76
+ # Combine multiple Office Excel spreadsheets (xlsx) into a single Office Excel spreadsheet
77
+ # @param input_file1 First input file to perform the operation on.
78
+ # @param input_file2 Second input file to perform the operation on (more than 2 can be supplied).
79
+ # @param [Hash] opts the optional parameters
80
+ # @return [String]
81
+ describe 'merge_document_xlsx test' do
82
+ it "should work" do
83
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
84
+ end
85
+ end
86
+
87
+ end
@@ -1,71 +1,71 @@
1
- =begin
2
- #convertapi
3
-
4
- #Convert API lets you effortlessly convert file formats and types.
5
-
6
- OpenAPI spec version: v1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for CloudmersiveConvertApiClient::ValidateDocumentApi
17
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
- # Please update as you see appropriate
19
- describe 'ValidateDocumentApi' do
20
- before do
21
- # run before each test
22
- @instance = CloudmersiveConvertApiClient::ValidateDocumentApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of ValidateDocumentApi' do
30
- it 'should create an instance of ValidateDocumentApi' do
31
- expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::ValidateDocumentApi)
32
- end
33
- end
34
-
35
- # unit tests for validate_document_docx_validation
36
- # Validate a Word document (DOCX)
37
- # Validate a Word document (DOCX); if the document is not valid, identifies the errors in the document
38
- # @param input_file Input file to perform the operation on.
39
- # @param [Hash] opts the optional parameters
40
- # @return [DocumentValidationResult]
41
- describe 'validate_document_docx_validation test' do
42
- it "should work" do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- # unit tests for validate_document_pptx_validation
48
- # Validate a PowerPoint presentation (PPTX)
49
- # Validate a PowerPoint presentation (PPTX); if the document is not valid, identifies the errors in the document
50
- # @param input_file Input file to perform the operation on.
51
- # @param [Hash] opts the optional parameters
52
- # @return [DocumentValidationResult]
53
- describe 'validate_document_pptx_validation test' do
54
- it "should work" do
55
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
- end
57
- end
58
-
59
- # unit tests for validate_document_xlsx_validation
60
- # Validate a Excel document (XLSX)
61
- # Validate a Excel document (XLSX); if the document is not valid, identifies the errors in the document
62
- # @param input_file Input file to perform the operation on.
63
- # @param [Hash] opts the optional parameters
64
- # @return [DocumentValidationResult]
65
- describe 'validate_document_xlsx_validation test' do
66
- it "should work" do
67
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
- end
69
- end
70
-
71
- end
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for CloudmersiveConvertApiClient::ValidateDocumentApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'ValidateDocumentApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = CloudmersiveConvertApiClient::ValidateDocumentApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of ValidateDocumentApi' do
30
+ it 'should create an instance of ValidateDocumentApi' do
31
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::ValidateDocumentApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for validate_document_docx_validation
36
+ # Validate a Word document (DOCX)
37
+ # Validate a Word document (DOCX); if the document is not valid, identifies the errors in the document
38
+ # @param input_file Input file to perform the operation on.
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [DocumentValidationResult]
41
+ describe 'validate_document_docx_validation test' do
42
+ it "should work" do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ # unit tests for validate_document_pptx_validation
48
+ # Validate a PowerPoint presentation (PPTX)
49
+ # Validate a PowerPoint presentation (PPTX); if the document is not valid, identifies the errors in the document
50
+ # @param input_file Input file to perform the operation on.
51
+ # @param [Hash] opts the optional parameters
52
+ # @return [DocumentValidationResult]
53
+ describe 'validate_document_pptx_validation test' do
54
+ it "should work" do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ # unit tests for validate_document_xlsx_validation
60
+ # Validate a Excel document (XLSX)
61
+ # Validate a Excel document (XLSX); if the document is not valid, identifies the errors in the document
62
+ # @param input_file Input file to perform the operation on.
63
+ # @param [Hash] opts the optional parameters
64
+ # @return [DocumentValidationResult]
65
+ describe 'validate_document_xlsx_validation test' do
66
+ it "should work" do
67
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
68
+ end
69
+ end
70
+
71
+ end
@@ -1,47 +1,47 @@
1
- =begin
2
- #convertapi
3
-
4
- #Convert API lets you effortlessly convert file formats and types.
5
-
6
- OpenAPI spec version: v1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
- require 'json'
15
-
16
- # Unit tests for CloudmersiveConvertApiClient::ViewerToolsApi
17
- # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
- # Please update as you see appropriate
19
- describe 'ViewerToolsApi' do
20
- before do
21
- # run before each test
22
- @instance = CloudmersiveConvertApiClient::ViewerToolsApi.new
23
- end
24
-
25
- after do
26
- # run after each test
27
- end
28
-
29
- describe 'test an instance of ViewerToolsApi' do
30
- it 'should create an instance of ViewerToolsApi' do
31
- expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::ViewerToolsApi)
32
- end
33
- end
34
-
35
- # unit tests for viewer_tools_create_simple
36
- # Create a web-based viewer
37
- # Creates an HTML embed code for a simple web-based viewer of a document; supports Office document types and PDF.
38
- # @param input_file Input file to perform the operation on.
39
- # @param [Hash] opts the optional parameters
40
- # @return [ViewerResponse]
41
- describe 'viewer_tools_create_simple test' do
42
- it "should work" do
43
- # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
- end
45
- end
46
-
47
- end
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+
16
+ # Unit tests for CloudmersiveConvertApiClient::ViewerToolsApi
17
+ # Automatically generated by swagger-codegen (github.com/swagger-api/swagger-codegen)
18
+ # Please update as you see appropriate
19
+ describe 'ViewerToolsApi' do
20
+ before do
21
+ # run before each test
22
+ @instance = CloudmersiveConvertApiClient::ViewerToolsApi.new
23
+ end
24
+
25
+ after do
26
+ # run after each test
27
+ end
28
+
29
+ describe 'test an instance of ViewerToolsApi' do
30
+ it 'should create an instance of ViewerToolsApi' do
31
+ expect(@instance).to be_instance_of(CloudmersiveConvertApiClient::ViewerToolsApi)
32
+ end
33
+ end
34
+
35
+ # unit tests for viewer_tools_create_simple
36
+ # Create a web-based viewer
37
+ # Creates an HTML embed code for a simple web-based viewer of a document; supports Office document types and PDF.
38
+ # @param input_file Input file to perform the operation on.
39
+ # @param [Hash] opts the optional parameters
40
+ # @return [ViewerResponse]
41
+ describe 'viewer_tools_create_simple test' do
42
+ it "should work" do
43
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
44
+ end
45
+ end
46
+
47
+ end
@@ -1,226 +1,226 @@
1
- =begin
2
- #convertapi
3
-
4
- #Convert API lets you effortlessly convert file formats and types.
5
-
6
- OpenAPI spec version: v1
7
-
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: unset
10
-
11
- =end
12
-
13
- require 'spec_helper'
14
-
15
- describe CloudmersiveConvertApiClient::ApiClient do
16
- context 'initialization' do
17
- context 'URL stuff' do
18
- context 'host' do
19
- it 'removes http from host' do
20
- CloudmersiveConvertApiClient.configure { |c| c.host = 'http://example.com' }
21
- expect(CloudmersiveConvertApiClient::Configuration.default.host).to eq('example.com')
22
- end
23
-
24
- it 'removes https from host' do
25
- CloudmersiveConvertApiClient.configure { |c| c.host = 'https://wookiee.com' }
26
- expect(CloudmersiveConvertApiClient::ApiClient.default.config.host).to eq('wookiee.com')
27
- end
28
-
29
- it 'removes trailing path from host' do
30
- CloudmersiveConvertApiClient.configure { |c| c.host = 'hobo.com/v4' }
31
- expect(CloudmersiveConvertApiClient::Configuration.default.host).to eq('hobo.com')
32
- end
33
- end
34
-
35
- context 'base_path' do
36
- it "prepends a slash to base_path" do
37
- CloudmersiveConvertApiClient.configure { |c| c.base_path = 'v4/dog' }
38
- expect(CloudmersiveConvertApiClient::Configuration.default.base_path).to eq('/v4/dog')
39
- end
40
-
41
- it "doesn't prepend a slash if one is already there" do
42
- CloudmersiveConvertApiClient.configure { |c| c.base_path = '/v4/dog' }
43
- expect(CloudmersiveConvertApiClient::Configuration.default.base_path).to eq('/v4/dog')
44
- end
45
-
46
- it "ends up as a blank string if nil" do
47
- CloudmersiveConvertApiClient.configure { |c| c.base_path = nil }
48
- expect(CloudmersiveConvertApiClient::Configuration.default.base_path).to eq('')
49
- end
50
- end
51
- end
52
- end
53
-
54
- describe "params_encoding in #build_request" do
55
- let(:config) { CloudmersiveConvertApiClient::Configuration.new }
56
- let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new(config) }
57
-
58
- it "defaults to nil" do
59
- expect(CloudmersiveConvertApiClient::Configuration.default.params_encoding).to eq(nil)
60
- expect(config.params_encoding).to eq(nil)
61
-
62
- request = api_client.build_request(:get, '/test')
63
- expect(request.options[:params_encoding]).to eq(nil)
64
- end
65
-
66
- it "can be customized" do
67
- config.params_encoding = :multi
68
- request = api_client.build_request(:get, '/test')
69
- expect(request.options[:params_encoding]).to eq(:multi)
70
- end
71
- end
72
-
73
- describe "timeout in #build_request" do
74
- let(:config) { CloudmersiveConvertApiClient::Configuration.new }
75
- let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new(config) }
76
-
77
- it "defaults to 0" do
78
- expect(CloudmersiveConvertApiClient::Configuration.default.timeout).to eq(0)
79
- expect(config.timeout).to eq(0)
80
-
81
- request = api_client.build_request(:get, '/test')
82
- expect(request.options[:timeout]).to eq(0)
83
- end
84
-
85
- it "can be customized" do
86
- config.timeout = 100
87
- request = api_client.build_request(:get, '/test')
88
- expect(request.options[:timeout]).to eq(100)
89
- end
90
- end
91
-
92
- describe "#deserialize" do
93
- it "handles Array<Integer>" do
94
- api_client = CloudmersiveConvertApiClient::ApiClient.new
95
- headers = {'Content-Type' => 'application/json'}
96
- response = double('response', headers: headers, body: '[12, 34]')
97
- data = api_client.deserialize(response, 'Array<Integer>')
98
- expect(data).to be_instance_of(Array)
99
- expect(data).to eq([12, 34])
100
- end
101
-
102
- it "handles Array<Array<Integer>>" do
103
- api_client = CloudmersiveConvertApiClient::ApiClient.new
104
- headers = {'Content-Type' => 'application/json'}
105
- response = double('response', headers: headers, body: '[[12, 34], [56]]')
106
- data = api_client.deserialize(response, 'Array<Array<Integer>>')
107
- expect(data).to be_instance_of(Array)
108
- expect(data).to eq([[12, 34], [56]])
109
- end
110
-
111
- it "handles Hash<String, String>" do
112
- api_client = CloudmersiveConvertApiClient::ApiClient.new
113
- headers = {'Content-Type' => 'application/json'}
114
- response = double('response', headers: headers, body: '{"message": "Hello"}')
115
- data = api_client.deserialize(response, 'Hash<String, String>')
116
- expect(data).to be_instance_of(Hash)
117
- expect(data).to eq({:message => 'Hello'})
118
- end
119
- end
120
-
121
- describe "#object_to_hash" do
122
- it "ignores nils and includes empty arrays" do
123
- # uncomment below to test object_to_hash for model
124
- #api_client = CloudmersiveConvertApiClient::ApiClient.new
125
- #_model = CloudmersiveConvertApiClient::ModelName.new
126
- # update the model attribute below
127
- #_model.id = 1
128
- # update the expected value (hash) below
129
- #expected = {id: 1, name: '', tags: []}
130
- #expect(api_client.object_to_hash(_model)).to eq(expected)
131
- end
132
- end
133
-
134
- describe "#build_collection_param" do
135
- let(:param) { ['aa', 'bb', 'cc'] }
136
- let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new }
137
-
138
- it "works for csv" do
139
- expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
140
- end
141
-
142
- it "works for ssv" do
143
- expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
144
- end
145
-
146
- it "works for tsv" do
147
- expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
148
- end
149
-
150
- it "works for pipes" do
151
- expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
152
- end
153
-
154
- it "works for multi" do
155
- expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
156
- end
157
-
158
- it "fails for invalid collection format" do
159
- expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
160
- end
161
- end
162
-
163
- describe "#json_mime?" do
164
- let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new }
165
-
166
- it "works" do
167
- expect(api_client.json_mime?(nil)).to eq false
168
- expect(api_client.json_mime?('')).to eq false
169
-
170
- expect(api_client.json_mime?('application/json')).to eq true
171
- expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
172
- expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
173
-
174
- expect(api_client.json_mime?('application/xml')).to eq false
175
- expect(api_client.json_mime?('text/plain')).to eq false
176
- expect(api_client.json_mime?('application/jsonp')).to eq false
177
- end
178
- end
179
-
180
- describe "#select_header_accept" do
181
- let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new }
182
-
183
- it "works" do
184
- expect(api_client.select_header_accept(nil)).to be_nil
185
- expect(api_client.select_header_accept([])).to be_nil
186
-
187
- expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
188
- expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
189
- expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
190
-
191
- expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
192
- expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
193
- end
194
- end
195
-
196
- describe "#select_header_content_type" do
197
- let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new }
198
-
199
- it "works" do
200
- expect(api_client.select_header_content_type(nil)).to eq('application/json')
201
- expect(api_client.select_header_content_type([])).to eq('application/json')
202
-
203
- expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
204
- expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
205
- expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
206
- expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
207
- expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
208
- end
209
- end
210
-
211
- describe "#sanitize_filename" do
212
- let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new }
213
-
214
- it "works" do
215
- expect(api_client.sanitize_filename('sun')).to eq('sun')
216
- expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
217
- expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
218
- expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
219
- expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
220
- expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
221
- expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
222
- expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
223
- expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
224
- end
225
- end
226
- end
1
+ =begin
2
+ #convertapi
3
+
4
+ #Convert API lets you effortlessly convert file formats and types.
5
+
6
+ OpenAPI spec version: v1
7
+
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: unset
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+
15
+ describe CloudmersiveConvertApiClient::ApiClient do
16
+ context 'initialization' do
17
+ context 'URL stuff' do
18
+ context 'host' do
19
+ it 'removes http from host' do
20
+ CloudmersiveConvertApiClient.configure { |c| c.host = 'http://example.com' }
21
+ expect(CloudmersiveConvertApiClient::Configuration.default.host).to eq('example.com')
22
+ end
23
+
24
+ it 'removes https from host' do
25
+ CloudmersiveConvertApiClient.configure { |c| c.host = 'https://wookiee.com' }
26
+ expect(CloudmersiveConvertApiClient::ApiClient.default.config.host).to eq('wookiee.com')
27
+ end
28
+
29
+ it 'removes trailing path from host' do
30
+ CloudmersiveConvertApiClient.configure { |c| c.host = 'hobo.com/v4' }
31
+ expect(CloudmersiveConvertApiClient::Configuration.default.host).to eq('hobo.com')
32
+ end
33
+ end
34
+
35
+ context 'base_path' do
36
+ it "prepends a slash to base_path" do
37
+ CloudmersiveConvertApiClient.configure { |c| c.base_path = 'v4/dog' }
38
+ expect(CloudmersiveConvertApiClient::Configuration.default.base_path).to eq('/v4/dog')
39
+ end
40
+
41
+ it "doesn't prepend a slash if one is already there" do
42
+ CloudmersiveConvertApiClient.configure { |c| c.base_path = '/v4/dog' }
43
+ expect(CloudmersiveConvertApiClient::Configuration.default.base_path).to eq('/v4/dog')
44
+ end
45
+
46
+ it "ends up as a blank string if nil" do
47
+ CloudmersiveConvertApiClient.configure { |c| c.base_path = nil }
48
+ expect(CloudmersiveConvertApiClient::Configuration.default.base_path).to eq('')
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ describe "params_encoding in #build_request" do
55
+ let(:config) { CloudmersiveConvertApiClient::Configuration.new }
56
+ let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new(config) }
57
+
58
+ it "defaults to nil" do
59
+ expect(CloudmersiveConvertApiClient::Configuration.default.params_encoding).to eq(nil)
60
+ expect(config.params_encoding).to eq(nil)
61
+
62
+ request = api_client.build_request(:get, '/test')
63
+ expect(request.options[:params_encoding]).to eq(nil)
64
+ end
65
+
66
+ it "can be customized" do
67
+ config.params_encoding = :multi
68
+ request = api_client.build_request(:get, '/test')
69
+ expect(request.options[:params_encoding]).to eq(:multi)
70
+ end
71
+ end
72
+
73
+ describe "timeout in #build_request" do
74
+ let(:config) { CloudmersiveConvertApiClient::Configuration.new }
75
+ let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new(config) }
76
+
77
+ it "defaults to 0" do
78
+ expect(CloudmersiveConvertApiClient::Configuration.default.timeout).to eq(0)
79
+ expect(config.timeout).to eq(0)
80
+
81
+ request = api_client.build_request(:get, '/test')
82
+ expect(request.options[:timeout]).to eq(0)
83
+ end
84
+
85
+ it "can be customized" do
86
+ config.timeout = 100
87
+ request = api_client.build_request(:get, '/test')
88
+ expect(request.options[:timeout]).to eq(100)
89
+ end
90
+ end
91
+
92
+ describe "#deserialize" do
93
+ it "handles Array<Integer>" do
94
+ api_client = CloudmersiveConvertApiClient::ApiClient.new
95
+ headers = {'Content-Type' => 'application/json'}
96
+ response = double('response', headers: headers, body: '[12, 34]')
97
+ data = api_client.deserialize(response, 'Array<Integer>')
98
+ expect(data).to be_instance_of(Array)
99
+ expect(data).to eq([12, 34])
100
+ end
101
+
102
+ it "handles Array<Array<Integer>>" do
103
+ api_client = CloudmersiveConvertApiClient::ApiClient.new
104
+ headers = {'Content-Type' => 'application/json'}
105
+ response = double('response', headers: headers, body: '[[12, 34], [56]]')
106
+ data = api_client.deserialize(response, 'Array<Array<Integer>>')
107
+ expect(data).to be_instance_of(Array)
108
+ expect(data).to eq([[12, 34], [56]])
109
+ end
110
+
111
+ it "handles Hash<String, String>" do
112
+ api_client = CloudmersiveConvertApiClient::ApiClient.new
113
+ headers = {'Content-Type' => 'application/json'}
114
+ response = double('response', headers: headers, body: '{"message": "Hello"}')
115
+ data = api_client.deserialize(response, 'Hash<String, String>')
116
+ expect(data).to be_instance_of(Hash)
117
+ expect(data).to eq({:message => 'Hello'})
118
+ end
119
+ end
120
+
121
+ describe "#object_to_hash" do
122
+ it "ignores nils and includes empty arrays" do
123
+ # uncomment below to test object_to_hash for model
124
+ #api_client = CloudmersiveConvertApiClient::ApiClient.new
125
+ #_model = CloudmersiveConvertApiClient::ModelName.new
126
+ # update the model attribute below
127
+ #_model.id = 1
128
+ # update the expected value (hash) below
129
+ #expected = {id: 1, name: '', tags: []}
130
+ #expect(api_client.object_to_hash(_model)).to eq(expected)
131
+ end
132
+ end
133
+
134
+ describe "#build_collection_param" do
135
+ let(:param) { ['aa', 'bb', 'cc'] }
136
+ let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new }
137
+
138
+ it "works for csv" do
139
+ expect(api_client.build_collection_param(param, :csv)).to eq('aa,bb,cc')
140
+ end
141
+
142
+ it "works for ssv" do
143
+ expect(api_client.build_collection_param(param, :ssv)).to eq('aa bb cc')
144
+ end
145
+
146
+ it "works for tsv" do
147
+ expect(api_client.build_collection_param(param, :tsv)).to eq("aa\tbb\tcc")
148
+ end
149
+
150
+ it "works for pipes" do
151
+ expect(api_client.build_collection_param(param, :pipes)).to eq('aa|bb|cc')
152
+ end
153
+
154
+ it "works for multi" do
155
+ expect(api_client.build_collection_param(param, :multi)).to eq(['aa', 'bb', 'cc'])
156
+ end
157
+
158
+ it "fails for invalid collection format" do
159
+ expect(proc { api_client.build_collection_param(param, :INVALID) }).to raise_error(RuntimeError, 'unknown collection format: :INVALID')
160
+ end
161
+ end
162
+
163
+ describe "#json_mime?" do
164
+ let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new }
165
+
166
+ it "works" do
167
+ expect(api_client.json_mime?(nil)).to eq false
168
+ expect(api_client.json_mime?('')).to eq false
169
+
170
+ expect(api_client.json_mime?('application/json')).to eq true
171
+ expect(api_client.json_mime?('application/json; charset=UTF8')).to eq true
172
+ expect(api_client.json_mime?('APPLICATION/JSON')).to eq true
173
+
174
+ expect(api_client.json_mime?('application/xml')).to eq false
175
+ expect(api_client.json_mime?('text/plain')).to eq false
176
+ expect(api_client.json_mime?('application/jsonp')).to eq false
177
+ end
178
+ end
179
+
180
+ describe "#select_header_accept" do
181
+ let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new }
182
+
183
+ it "works" do
184
+ expect(api_client.select_header_accept(nil)).to be_nil
185
+ expect(api_client.select_header_accept([])).to be_nil
186
+
187
+ expect(api_client.select_header_accept(['application/json'])).to eq('application/json')
188
+ expect(api_client.select_header_accept(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
189
+ expect(api_client.select_header_accept(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
190
+
191
+ expect(api_client.select_header_accept(['application/xml'])).to eq('application/xml')
192
+ expect(api_client.select_header_accept(['text/html', 'application/xml'])).to eq('text/html,application/xml')
193
+ end
194
+ end
195
+
196
+ describe "#select_header_content_type" do
197
+ let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new }
198
+
199
+ it "works" do
200
+ expect(api_client.select_header_content_type(nil)).to eq('application/json')
201
+ expect(api_client.select_header_content_type([])).to eq('application/json')
202
+
203
+ expect(api_client.select_header_content_type(['application/json'])).to eq('application/json')
204
+ expect(api_client.select_header_content_type(['application/xml', 'application/json; charset=UTF8'])).to eq('application/json; charset=UTF8')
205
+ expect(api_client.select_header_content_type(['APPLICATION/JSON', 'text/html'])).to eq('APPLICATION/JSON')
206
+ expect(api_client.select_header_content_type(['application/xml'])).to eq('application/xml')
207
+ expect(api_client.select_header_content_type(['text/plain', 'application/xml'])).to eq('text/plain')
208
+ end
209
+ end
210
+
211
+ describe "#sanitize_filename" do
212
+ let(:api_client) { CloudmersiveConvertApiClient::ApiClient.new }
213
+
214
+ it "works" do
215
+ expect(api_client.sanitize_filename('sun')).to eq('sun')
216
+ expect(api_client.sanitize_filename('sun.gif')).to eq('sun.gif')
217
+ expect(api_client.sanitize_filename('../sun.gif')).to eq('sun.gif')
218
+ expect(api_client.sanitize_filename('/var/tmp/sun.gif')).to eq('sun.gif')
219
+ expect(api_client.sanitize_filename('./sun.gif')).to eq('sun.gif')
220
+ expect(api_client.sanitize_filename('..\sun.gif')).to eq('sun.gif')
221
+ expect(api_client.sanitize_filename('\var\tmp\sun.gif')).to eq('sun.gif')
222
+ expect(api_client.sanitize_filename('c:\var\tmp\sun.gif')).to eq('sun.gif')
223
+ expect(api_client.sanitize_filename('.\sun.gif')).to eq('sun.gif')
224
+ end
225
+ end
226
+ end