mailslurp_client 7.0.8 → 8.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mailslurp_client.rb +12 -3
- metadata +11 -372
- data/Gemfile +0 -9
- data/LICENSE +0 -22
- data/Makefile +0 -3
- data/README.md +0 -239
- data/Rakefile +0 -10
- data/docs/AliasControllerApi.md +0 -337
- data/docs/AttachmentControllerApi.md +0 -126
- data/docs/AttachmentMetaData.md +0 -23
- data/docs/BasicAuthOptions.md +0 -19
- data/docs/BulkActionsControllerApi.md +0 -165
- data/docs/BulkSendEmailOptions.md +0 -19
- data/docs/CommonActionsControllerApi.md +0 -218
- data/docs/ContactControllerApi.md +0 -274
- data/docs/ContactDto.md +0 -31
- data/docs/ContactProjection.md +0 -27
- data/docs/CreateAnonymousAliasOptions.md +0 -17
- data/docs/CreateContactOptions.md +0 -31
- data/docs/CreateDomainOptions.md +0 -17
- data/docs/CreateGroupOptions.md +0 -19
- data/docs/CreateOwnedAliasOptions.md +0 -23
- data/docs/CreateTemplateOptions.md +0 -19
- data/docs/CreateWebhookOptions.md +0 -21
- data/docs/DomainControllerApi.md +0 -223
- data/docs/DomainDto.md +0 -29
- data/docs/DomainPreview.md +0 -21
- data/docs/Email.md +0 -49
- data/docs/EmailAnalysis.md +0 -25
- data/docs/EmailControllerApi.md +0 -740
- data/docs/EmailPreview.md +0 -31
- data/docs/EmailProjection.md +0 -33
- data/docs/FormControllerApi.md +0 -79
- data/docs/ForwardEmailOptions.md +0 -23
- data/docs/GroupContactsDto.md +0 -19
- data/docs/GroupControllerApi.md +0 -437
- data/docs/GroupDto.md +0 -23
- data/docs/GroupProjection.md +0 -23
- data/docs/HTMLValidationResult.md +0 -21
- data/docs/Inbox.md +0 -33
- data/docs/InboxControllerApi.md +0 -705
- data/docs/InboxProjection.md +0 -29
- data/docs/JsonNode.md +0 -59
- data/docs/MatchOption.md +0 -21
- data/docs/MatchOptions.md +0 -17
- data/docs/ModelAlias.md +0 -31
- data/docs/PageAlias.md +0 -37
- data/docs/PageContactProjection.md +0 -37
- data/docs/PageEmailPreview.md +0 -37
- data/docs/PageEmailProjection.md +0 -37
- data/docs/PageGroupProjection.md +0 -37
- data/docs/PageInboxProjection.md +0 -37
- data/docs/PageTemplateProjection.md +0 -37
- data/docs/PageWebhookProjection.md +0 -37
- data/docs/Pageable.md +0 -27
- data/docs/RawEmailJson.md +0 -17
- data/docs/SendEmailOptions.md +0 -45
- data/docs/SetInboxFavouritedOptions.md +0 -17
- data/docs/SimpleSendEmailOptions.md +0 -23
- data/docs/Sort.md +0 -21
- data/docs/TemplateControllerApi.md +0 -274
- data/docs/TemplateDto.md +0 -25
- data/docs/TemplateProjection.md +0 -25
- data/docs/TemplateVariable.md +0 -19
- data/docs/UnreadCount.md +0 -17
- data/docs/UpdateGroupContacts.md +0 -17
- data/docs/UpdateInboxOptions.md +0 -25
- data/docs/UploadAttachmentOptions.md +0 -21
- data/docs/ValidationDto.md +0 -19
- data/docs/ValidationMessage.md +0 -19
- data/docs/WaitForConditions.md +0 -29
- data/docs/WaitForControllerApi.md +0 -317
- data/docs/WebhookControllerApi.md +0 -339
- data/docs/WebhookDto.md +0 -33
- data/docs/WebhookProjection.md +0 -27
- data/docs/WebhookTestRequest.md +0 -23
- data/docs/WebhookTestResponse.md +0 -19
- data/docs/WebhookTestResult.md +0 -21
- data/git_push.sh +0 -58
- data/lib/mailslurp_client/api/alias_controller_api.rb +0 -405
- data/lib/mailslurp_client/api/attachment_controller_api.rb +0 -160
- data/lib/mailslurp_client/api/bulk_actions_controller_api.rb +0 -203
- data/lib/mailslurp_client/api/common_actions_controller_api.rb +0 -257
- data/lib/mailslurp_client/api/contact_controller_api.rb +0 -323
- data/lib/mailslurp_client/api/domain_controller_api.rb +0 -264
- data/lib/mailslurp_client/api/email_controller_api.rb +0 -852
- data/lib/mailslurp_client/api/form_controller_api.rb +0 -104
- data/lib/mailslurp_client/api/group_controller_api.rb +0 -519
- data/lib/mailslurp_client/api/inbox_controller_api.rb +0 -822
- data/lib/mailslurp_client/api/template_controller_api.rb +0 -323
- data/lib/mailslurp_client/api/wait_for_controller_api.rb +0 -359
- data/lib/mailslurp_client/api/webhook_controller_api.rb +0 -405
- data/lib/mailslurp_client/api_client.rb +0 -386
- data/lib/mailslurp_client/api_error.rb +0 -57
- data/lib/mailslurp_client/configuration.rb +0 -248
- data/lib/mailslurp_client/models/attachment_meta_data.rb +0 -238
- data/lib/mailslurp_client/models/basic_auth_options.rb +0 -226
- data/lib/mailslurp_client/models/bulk_send_email_options.rb +0 -219
- data/lib/mailslurp_client/models/contact_dto.rb +0 -288
- data/lib/mailslurp_client/models/contact_projection.rb +0 -261
- data/lib/mailslurp_client/models/create_anonymous_alias_options.rb +0 -208
- data/lib/mailslurp_client/models/create_contact_options.rb +0 -277
- data/lib/mailslurp_client/models/create_domain_options.rb +0 -208
- data/lib/mailslurp_client/models/create_group_options.rb +0 -220
- data/lib/mailslurp_client/models/create_owned_alias_options.rb +0 -238
- data/lib/mailslurp_client/models/create_template_options.rb +0 -225
- data/lib/mailslurp_client/models/create_webhook_options.rb +0 -227
- data/lib/mailslurp_client/models/domain_dto.rb +0 -296
- data/lib/mailslurp_client/models/domain_preview.rb +0 -240
- data/lib/mailslurp_client/models/email.rb +0 -376
- data/lib/mailslurp_client/models/email_analysis.rb +0 -248
- data/lib/mailslurp_client/models/email_preview.rb +0 -286
- data/lib/mailslurp_client/models/email_projection.rb +0 -307
- data/lib/mailslurp_client/models/forward_email_options.rb +0 -244
- data/lib/mailslurp_client/models/group_contacts_dto.rb +0 -227
- data/lib/mailslurp_client/models/group_dto.rb +0 -248
- data/lib/mailslurp_client/models/group_projection.rb +0 -248
- data/lib/mailslurp_client/models/html_validation_result.rb +0 -243
- data/lib/mailslurp_client/models/inbox.rb +0 -290
- data/lib/mailslurp_client/models/inbox_projection.rb +0 -272
- data/lib/mailslurp_client/models/json_node.rb +0 -429
- data/lib/mailslurp_client/models/match_option.rb +0 -274
- data/lib/mailslurp_client/models/match_options.rb +0 -210
- data/lib/mailslurp_client/models/model_alias.rb +0 -284
- data/lib/mailslurp_client/models/page_alias.rb +0 -298
- data/lib/mailslurp_client/models/page_contact_projection.rb +0 -298
- data/lib/mailslurp_client/models/page_email_preview.rb +0 -298
- data/lib/mailslurp_client/models/page_email_projection.rb +0 -298
- data/lib/mailslurp_client/models/page_group_projection.rb +0 -298
- data/lib/mailslurp_client/models/page_inbox_projection.rb +0 -298
- data/lib/mailslurp_client/models/page_template_projection.rb +0 -298
- data/lib/mailslurp_client/models/page_webhook_projection.rb +0 -298
- data/lib/mailslurp_client/models/pageable.rb +0 -251
- data/lib/mailslurp_client/models/raw_email_json.rb +0 -211
- data/lib/mailslurp_client/models/send_email_options.rb +0 -392
- data/lib/mailslurp_client/models/set_inbox_favourited_options.rb +0 -208
- data/lib/mailslurp_client/models/simple_send_email_options.rb +0 -237
- data/lib/mailslurp_client/models/sort.rb +0 -224
- data/lib/mailslurp_client/models/template_dto.rb +0 -269
- data/lib/mailslurp_client/models/template_projection.rb +0 -269
- data/lib/mailslurp_client/models/template_variable.rb +0 -259
- data/lib/mailslurp_client/models/unread_count.rb +0 -211
- data/lib/mailslurp_client/models/update_group_contacts.rb +0 -213
- data/lib/mailslurp_client/models/update_inbox_options.rb +0 -250
- data/lib/mailslurp_client/models/upload_attachment_options.rb +0 -228
- data/lib/mailslurp_client/models/validation_dto.rb +0 -217
- data/lib/mailslurp_client/models/validation_message.rb +0 -220
- data/lib/mailslurp_client/models/wait_for_conditions.rb +0 -316
- data/lib/mailslurp_client/models/webhook_dto.rb +0 -326
- data/lib/mailslurp_client/models/webhook_projection.rb +0 -277
- data/lib/mailslurp_client/models/webhook_test_request.rb +0 -284
- data/lib/mailslurp_client/models/webhook_test_response.rb +0 -215
- data/lib/mailslurp_client/models/webhook_test_result.rb +0 -235
- data/lib/mailslurp_client/version.rb +0 -15
- data/mailslurp_client.gemspec +0 -39
- data/spec/api/alias_controller_api_spec.rb +0 -107
- data/spec/api/attachment_controller_api_spec.rb +0 -61
- data/spec/api/bulk_actions_controller_api_spec.rb +0 -68
- data/spec/api/common_actions_controller_api_spec.rb +0 -129
- data/spec/api/contact_controller_api_spec.rb +0 -91
- data/spec/api/domain_controller_api_spec.rb +0 -82
- data/spec/api/email_controller_api_spec.rb +0 -162
- data/spec/api/form_controller_api_spec.rb +0 -54
- data/spec/api/group_controller_api_spec.rb +0 -126
- data/spec/api/inbox_controller_api_spec.rb +0 -172
- data/spec/api/template_controller_api_spec.rb +0 -91
- data/spec/api/wait_for_controller_api_spec.rb +0 -107
- data/spec/api/webhook_controller_api_spec.rb +0 -107
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
- data/spec/models/attachment_meta_data_spec.rb +0 -59
- data/spec/models/basic_auth_options_spec.rb +0 -47
- data/spec/models/bulk_send_email_options_spec.rb +0 -47
- data/spec/models/contact_dto_spec.rb +0 -83
- data/spec/models/contact_projection_spec.rb +0 -71
- data/spec/models/create_anonymous_alias_options_spec.rb +0 -41
- data/spec/models/create_contact_options_spec.rb +0 -83
- data/spec/models/create_domain_options_spec.rb +0 -41
- data/spec/models/create_group_options_spec.rb +0 -47
- data/spec/models/create_owned_alias_options_spec.rb +0 -59
- data/spec/models/create_template_options_spec.rb +0 -47
- data/spec/models/create_webhook_options_spec.rb +0 -53
- data/spec/models/domain_dto_spec.rb +0 -77
- data/spec/models/domain_preview_spec.rb +0 -53
- data/spec/models/email_analysis_spec.rb +0 -65
- data/spec/models/email_preview_spec.rb +0 -83
- data/spec/models/email_projection_spec.rb +0 -89
- data/spec/models/email_spec.rb +0 -137
- data/spec/models/forward_email_options_spec.rb +0 -59
- data/spec/models/group_contacts_dto_spec.rb +0 -47
- data/spec/models/group_dto_spec.rb +0 -59
- data/spec/models/group_projection_spec.rb +0 -59
- data/spec/models/html_validation_result_spec.rb +0 -53
- data/spec/models/inbox_projection_spec.rb +0 -77
- data/spec/models/inbox_spec.rb +0 -89
- data/spec/models/json_node_spec.rb +0 -171
- data/spec/models/match_option_spec.rb +0 -61
- data/spec/models/match_options_spec.rb +0 -41
- data/spec/models/model_alias_spec.rb +0 -83
- data/spec/models/page_alias_spec.rb +0 -101
- data/spec/models/page_contact_projection_spec.rb +0 -101
- data/spec/models/page_email_preview_spec.rb +0 -101
- data/spec/models/page_email_projection_spec.rb +0 -101
- data/spec/models/page_group_projection_spec.rb +0 -101
- data/spec/models/page_inbox_projection_spec.rb +0 -101
- data/spec/models/page_template_projection_spec.rb +0 -101
- data/spec/models/page_webhook_projection_spec.rb +0 -101
- data/spec/models/pageable_spec.rb +0 -71
- data/spec/models/raw_email_json_spec.rb +0 -41
- data/spec/models/send_email_options_spec.rb +0 -129
- data/spec/models/set_inbox_favourited_options_spec.rb +0 -41
- data/spec/models/simple_send_email_options_spec.rb +0 -59
- data/spec/models/sort_spec.rb +0 -53
- data/spec/models/template_dto_spec.rb +0 -65
- data/spec/models/template_projection_spec.rb +0 -65
- data/spec/models/template_variable_spec.rb +0 -51
- data/spec/models/unread_count_spec.rb +0 -41
- data/spec/models/update_group_contacts_spec.rb +0 -41
- data/spec/models/update_inbox_options_spec.rb +0 -65
- data/spec/models/upload_attachment_options_spec.rb +0 -53
- data/spec/models/validation_dto_spec.rb +0 -47
- data/spec/models/validation_message_spec.rb +0 -47
- data/spec/models/wait_for_conditions_spec.rb +0 -85
- data/spec/models/webhook_dto_spec.rb +0 -93
- data/spec/models/webhook_projection_spec.rb +0 -71
- data/spec/models/webhook_test_request_spec.rb +0 -63
- data/spec/models/webhook_test_response_spec.rb +0 -47
- data/spec/models/webhook_test_result_spec.rb +0 -53
- data/spec/spec_helper.rb +0 -111
@@ -1,91 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#MailSlurp API
|
3
|
-
|
4
|
-
#MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository ## Basic Concepts ### Inboxes Inboxes have real email addresses that can send and receive emails. You can create inboxes with specific email addresses (using custom domains). You can also use randomly assigned MailSlurp addresses as unique, disposable test addresses. See the InboxController or [inbox and email address guide](https://www.mailslurp.com/guides/) for more information. ### Receive Emails You can receive emails in a number of ways. You can fetch emails and attachments directly from an inbox. Or you can use `waitFor` endpoints to hold a connection open until an email is received that matches given criteria (such as subject or body content). You can also use webhooks to have emails from multiple inboxes forwarded to your server via HTTP POST. InboxController methods with `waitFor` in the name have a long timeout period and instruct MailSlurp to wait until an expected email is received. You can set conditions on email counts, subject or body matches, and more. Most receive methods only return an email ID and not the full email (to keep response sizes low). To fetch the full body or attachments for an email use the email's ID with EmailController endpoints. See the InboxController or [receiving emails guide](https://www.mailslurp.com/guides/) for more information. ### Send Emails You can send templated HTML emails in several ways. You must first create an inbox to send an email. An inbox can have a specific address or a randomly assigned one. You can send emails from an inbox using `to`, `cc`, and `bcc` recipient lists or with contacts and contact groups. Emails can contain plain-text or HTML bodies. You can also use email templates that support [moustache](https://mustache.github.io/) template variables. You can send attachments by first posting files to the AttachmentController and then using the returned IDs in the `attachments` field of the send options. See the InboxController or [sending emails guide](https://www.mailslurp.com/guides/) for more information. ### Templates MailSlurp emails support templates. You can create templates in the dashboard or API that contain [moustache](https://mustache.github.io/) style variables: for instance `Hello {{name}}`. Then when sending emails you can pass a map of variables names and values to be used. Additionally, when sending emails with contact groups you can use properties of the contact in your templates like `{{firstName}}` and `{{lastName}}`. > You can do a lot more with MailSlurp so see the included documentation for more information.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 6.5.2
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for MailSlurpClient::TemplateControllerApi
|
17
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'TemplateControllerApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@api_instance = MailSlurpClient::TemplateControllerApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of TemplateControllerApi' do
|
30
|
-
it 'should create an instance of TemplateControllerApi' do
|
31
|
-
expect(@api_instance).to be_instance_of(MailSlurpClient::TemplateControllerApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for create_template
|
36
|
-
# Create a Template
|
37
|
-
# @param create_template_options createTemplateOptions
|
38
|
-
# @param [Hash] opts the optional parameters
|
39
|
-
# @return [TemplateDto]
|
40
|
-
describe 'create_template test' do
|
41
|
-
it 'should work' do
|
42
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
43
|
-
end
|
44
|
-
end
|
45
|
-
|
46
|
-
# unit tests for delete_template
|
47
|
-
# Delete Template
|
48
|
-
# @param template_id TemplateId
|
49
|
-
# @param [Hash] opts the optional parameters
|
50
|
-
# @return [nil]
|
51
|
-
describe 'delete_template test' do
|
52
|
-
it 'should work' do
|
53
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
# unit tests for get_all_templates
|
58
|
-
# Get all Templates in paginated format
|
59
|
-
# @param [Hash] opts the optional parameters
|
60
|
-
# @option opts [Integer] :page Optional page index in inbox list pagination
|
61
|
-
# @option opts [Integer] :size Optional page size in inbox list pagination
|
62
|
-
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
63
|
-
# @return [PageTemplateProjection]
|
64
|
-
describe 'get_all_templates test' do
|
65
|
-
it 'should work' do
|
66
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
# unit tests for get_template
|
71
|
-
# Get Template
|
72
|
-
# @param template_id TemplateId
|
73
|
-
# @param [Hash] opts the optional parameters
|
74
|
-
# @return [TemplateDto]
|
75
|
-
describe 'get_template test' do
|
76
|
-
it 'should work' do
|
77
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
# unit tests for get_templates
|
82
|
-
# Get all Templates
|
83
|
-
# @param [Hash] opts the optional parameters
|
84
|
-
# @return [Array<TemplateProjection>]
|
85
|
-
describe 'get_templates test' do
|
86
|
-
it 'should work' do
|
87
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
88
|
-
end
|
89
|
-
end
|
90
|
-
|
91
|
-
end
|
@@ -1,107 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#MailSlurp API
|
3
|
-
|
4
|
-
#MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 67c9a1eda264be4cfe0bb2c76151f0aadf0862bc
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for MailSlurpClient::WaitForControllerApi
|
17
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'WaitForControllerApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@api_instance = MailSlurpClient::WaitForControllerApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of WaitForControllerApi' do
|
30
|
-
it 'should create an instance of WaitForControllerApi' do
|
31
|
-
expect(@api_instance).to be_instance_of(MailSlurpClient::WaitForControllerApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for wait_for
|
36
|
-
# Wait for conditions to be met
|
37
|
-
# Generic waitFor method that will wait until an inbox meets given conditions or return immediately if already met
|
38
|
-
# @param [Hash] opts the optional parameters
|
39
|
-
# @option opts [WaitForConditions] :wait_for_conditions Conditions to wait for
|
40
|
-
# @return [Array<EmailPreview>]
|
41
|
-
describe 'wait_for 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 wait_for_email_count
|
48
|
-
# Wait for and return count number of emails
|
49
|
-
# If inbox contains count or more emails at time of request then return count worth of emails. If not wait until the count is reached and return those or return an error if timeout is exceeded.
|
50
|
-
# @param [Hash] opts the optional parameters
|
51
|
-
# @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
|
52
|
-
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
53
|
-
# @option opts [Integer] :timeout Max milliseconds to wait
|
54
|
-
# @option opts [Boolean] :unread_only Optional filter for unread only
|
55
|
-
# @return [Array<EmailPreview>]
|
56
|
-
describe 'wait_for_email_count test' do
|
57
|
-
it 'should work' do
|
58
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
59
|
-
end
|
60
|
-
end
|
61
|
-
|
62
|
-
# unit tests for wait_for_latest_email
|
63
|
-
# Fetch inbox's latest email or if empty wait for an email to arrive
|
64
|
-
# Will return either the last received email or wait for an email to arrive and return that. If you need to wait for an email for a non-empty inbox see the other receive methods such as waitForNthEmail or waitForEmailCount.
|
65
|
-
# @param [Hash] opts the optional parameters
|
66
|
-
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
67
|
-
# @option opts [Integer] :timeout Max milliseconds to wait
|
68
|
-
# @option opts [Boolean] :unread_only Optional filter for unread only
|
69
|
-
# @return [Email]
|
70
|
-
describe 'wait_for_latest_email test' do
|
71
|
-
it 'should work' do
|
72
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
73
|
-
end
|
74
|
-
end
|
75
|
-
|
76
|
-
# unit tests for wait_for_matching_email
|
77
|
-
# Wait or return list of emails that match simple matching patterns
|
78
|
-
# Perform a search of emails in an inbox with the given patterns. If results match expected count then return or else retry the search until results are found or timeout is reached. Match options allow simple CONTAINS or EQUALS filtering on SUBJECT, TO, BCC, CC, and FROM. See the `MatchOptions` object for options.
|
79
|
-
# @param match_options matchOptions
|
80
|
-
# @param [Hash] opts the optional parameters
|
81
|
-
# @option opts [Integer] :count Number of emails to wait for. Must be greater that 1
|
82
|
-
# @option opts [String] :inbox_id Id of the inbox we are fetching emails from
|
83
|
-
# @option opts [Integer] :timeout Max milliseconds to wait
|
84
|
-
# @option opts [Boolean] :unread_only Optional filter for unread only
|
85
|
-
# @return [Array<EmailPreview>]
|
86
|
-
describe 'wait_for_matching_email test' do
|
87
|
-
it 'should work' do
|
88
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
89
|
-
end
|
90
|
-
end
|
91
|
-
|
92
|
-
# unit tests for wait_for_nth_email
|
93
|
-
# Wait for or fetch the email with a given index in the inbox specified
|
94
|
-
# If nth email is already present in inbox then return it. If not hold the connection open until timeout expires or the nth email is received and returned.
|
95
|
-
# @param [Hash] opts the optional parameters
|
96
|
-
# @option opts [String] :inbox_id Id of the inbox you are fetching emails from
|
97
|
-
# @option opts [Integer] :index Zero based index of the email to wait for. If an inbox has 1 email already and you want to wait for the 2nd email pass index=1
|
98
|
-
# @option opts [Integer] :timeout Max milliseconds to wait for the nth email if not already present
|
99
|
-
# @option opts [Boolean] :unread_only Optional filter for unread only
|
100
|
-
# @return [Email]
|
101
|
-
describe 'wait_for_nth_email test' do
|
102
|
-
it 'should work' do
|
103
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
end
|
@@ -1,107 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#MailSlurp API
|
3
|
-
|
4
|
-
#MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository ## Basic Concepts ### Inboxes Inboxes have real email addresses that can send and receive emails. You can create inboxes with specific email addresses (using custom domains). You can also use randomly assigned MailSlurp addresses as unique, disposable test addresses. See the InboxController or [inbox and email address guide](https://www.mailslurp.com/guides/) for more information. ### Receive Emails You can receive emails in a number of ways. You can fetch emails and attachments directly from an inbox. Or you can use `waitFor` endpoints to hold a connection open until an email is received that matches given criteria (such as subject or body content). You can also use webhooks to have emails from multiple inboxes forwarded to your server via HTTP POST. InboxController methods with `waitFor` in the name have a long timeout period and instruct MailSlurp to wait until an expected email is received. You can set conditions on email counts, subject or body matches, and more. Most receive methods only return an email ID and not the full email (to keep response sizes low). To fetch the full body or attachments for an email use the email's ID with EmailController endpoints. See the InboxController or [receiving emails guide](https://www.mailslurp.com/guides/) for more information. ### Send Emails You can send templated HTML emails in several ways. You must first create an inbox to send an email. An inbox can have a specific address or a randomly assigned one. You can send emails from an inbox using `to`, `cc`, and `bcc` recipient lists or with contacts and contact groups. Emails can contain plain-text or HTML bodies. You can also use email templates that support [moustache](https://mustache.github.io/) template variables. You can send attachments by first posting files to the AttachmentController and then using the returned IDs in the `attachments` field of the send options. See the InboxController or [sending emails guide](https://www.mailslurp.com/guides/) for more information. ### Templates MailSlurp emails support templates. You can create templates in the dashboard or API that contain [moustache](https://mustache.github.io/) style variables: for instance `Hello {{name}}`. Then when sending emails you can pass a map of variables names and values to be used. Additionally, when sending emails with contact groups you can use properties of the contact in your templates like `{{firstName}}` and `{{lastName}}`. > You can do a lot more with MailSlurp so see the included documentation for more information.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 6.5.2
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
require 'json'
|
15
|
-
|
16
|
-
# Unit tests for MailSlurpClient::WebhookControllerApi
|
17
|
-
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
-
# Please update as you see appropriate
|
19
|
-
describe 'WebhookControllerApi' do
|
20
|
-
before do
|
21
|
-
# run before each test
|
22
|
-
@api_instance = MailSlurpClient::WebhookControllerApi.new
|
23
|
-
end
|
24
|
-
|
25
|
-
after do
|
26
|
-
# run after each test
|
27
|
-
end
|
28
|
-
|
29
|
-
describe 'test an instance of WebhookControllerApi' do
|
30
|
-
it 'should create an instance of WebhookControllerApi' do
|
31
|
-
expect(@api_instance).to be_instance_of(MailSlurpClient::WebhookControllerApi)
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
# unit tests for create_webhook
|
36
|
-
# Attach a WebHook URL to an inbox
|
37
|
-
# Get notified whenever an inbox receives an email via a WebHook URL. An emailID will be posted to this URL every time an email is received for this inbox. The URL must be publicly reachable by the MailSlurp server. You can provide basicAuth values if you wish to secure this endpoint.
|
38
|
-
# @param inbox_id inboxId
|
39
|
-
# @param webhook_options webhookOptions
|
40
|
-
# @param [Hash] opts the optional parameters
|
41
|
-
# @return [WebhookDto]
|
42
|
-
describe 'create_webhook 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 delete_webhook
|
49
|
-
# Delete and disable a Webhook for an Inbox
|
50
|
-
# @param inbox_id inboxId
|
51
|
-
# @param webhook_id webhookId
|
52
|
-
# @param [Hash] opts the optional parameters
|
53
|
-
# @return [nil]
|
54
|
-
describe 'delete_webhook test' do
|
55
|
-
it 'should work' do
|
56
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
57
|
-
end
|
58
|
-
end
|
59
|
-
|
60
|
-
# unit tests for get_all_webhooks
|
61
|
-
# List Webhooks Paginated
|
62
|
-
# List webhooks in paginated form. Allows for page index, page size, and sort direction.
|
63
|
-
# @param [Hash] opts the optional parameters
|
64
|
-
# @option opts [Integer] :page Optional page index in inbox list pagination
|
65
|
-
# @option opts [Integer] :size Optional page size in inbox list pagination
|
66
|
-
# @option opts [String] :sort Optional createdAt sort direction ASC or DESC
|
67
|
-
# @return [PageWebhookProjection]
|
68
|
-
describe 'get_all_webhooks 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 get_webhook
|
75
|
-
# Get a webhook for an Inbox
|
76
|
-
# @param webhook_id webhookId
|
77
|
-
# @param [Hash] opts the optional parameters
|
78
|
-
# @return [WebhookDto]
|
79
|
-
describe 'get_webhook test' do
|
80
|
-
it 'should work' do
|
81
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
82
|
-
end
|
83
|
-
end
|
84
|
-
|
85
|
-
# unit tests for get_webhooks
|
86
|
-
# Get all Webhooks for an Inbox
|
87
|
-
# @param inbox_id inboxId
|
88
|
-
# @param [Hash] opts the optional parameters
|
89
|
-
# @return [Array<WebhookDto>]
|
90
|
-
describe 'get_webhooks test' do
|
91
|
-
it 'should work' do
|
92
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
93
|
-
end
|
94
|
-
end
|
95
|
-
|
96
|
-
# unit tests for send_test_data
|
97
|
-
# Send webhook test data
|
98
|
-
# @param webhook_id webhookId
|
99
|
-
# @param [Hash] opts the optional parameters
|
100
|
-
# @return [WebhookTestResult]
|
101
|
-
describe 'send_test_data test' do
|
102
|
-
it 'should work' do
|
103
|
-
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
104
|
-
end
|
105
|
-
end
|
106
|
-
|
107
|
-
end
|
data/spec/api_client_spec.rb
DELETED
@@ -1,226 +0,0 @@
|
|
1
|
-
=begin
|
2
|
-
#MailSlurp API
|
3
|
-
|
4
|
-
#MailSlurp is an API for sending and receiving emails from dynamically allocated email addresses. It's designed for developers and QA teams to test applications, process inbound emails, send templated notifications, attachments, and more. ## Resources - [Homepage](https://www.mailslurp.com) - Get an [API KEY](https://app.mailslurp.com/sign-up/) - Generated [SDK Clients](https://www.mailslurp.com/docs/) - [Examples](https://github.com/mailslurp/examples) repository ## Basic Concepts ### Inboxes Inboxes have real email addresses that can send and receive emails. You can create inboxes with specific email addresses (using custom domains). You can also use randomly assigned MailSlurp addresses as unique, disposable test addresses. See the InboxController or [inbox and email address guide](https://www.mailslurp.com/guides/) for more information. ### Receive Emails You can receive emails in a number of ways. You can fetch emails and attachments directly from an inbox. Or you can use `waitFor` endpoints to hold a connection open until an email is received that matches given criteria (such as subject or body content). You can also use webhooks to have emails from multiple inboxes forwarded to your server via HTTP POST. InboxController methods with `waitFor` in the name have a long timeout period and instruct MailSlurp to wait until an expected email is received. You can set conditions on email counts, subject or body matches, and more. Most receive methods only return an email ID and not the full email (to keep response sizes low). To fetch the full body or attachments for an email use the email's ID with EmailController endpoints. See the InboxController or [receiving emails guide](https://www.mailslurp.com/guides/) for more information. ### Send Emails You can send templated HTML emails in several ways. You must first create an inbox to send an email. An inbox can have a specific address or a randomly assigned one. You can send emails from an inbox using `to`, `cc`, and `bcc` recipient lists or with contacts and contact groups. Emails can contain plain-text or HTML bodies. You can also use email templates that support [moustache](https://mustache.github.io/) template variables. You can send attachments by first posting files to the AttachmentController and then using the returned IDs in the `attachments` field of the send options. See the InboxController or [sending emails guide](https://www.mailslurp.com/guides/) for more information. ### Templates MailSlurp emails support templates. You can create templates in the dashboard or API that contain [moustache](https://mustache.github.io/) style variables: for instance `Hello {{name}}`. Then when sending emails you can pass a map of variables names and values to be used. Additionally, when sending emails with contact groups you can use properties of the contact in your templates like `{{firstName}}` and `{{lastName}}`. > You can do a lot more with MailSlurp so see the included documentation for more information.
|
5
|
-
|
6
|
-
The version of the OpenAPI document: 6.5.2
|
7
|
-
|
8
|
-
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.3
|
10
|
-
|
11
|
-
=end
|
12
|
-
|
13
|
-
require 'spec_helper'
|
14
|
-
|
15
|
-
describe MailSlurpClient::ApiClient do
|
16
|
-
context 'initialization' do
|
17
|
-
context 'URL stuff' do
|
18
|
-
context 'host' do
|
19
|
-
it 'removes http from host' do
|
20
|
-
MailSlurpClient.configure { |c| c.host = 'http://example.com' }
|
21
|
-
expect(MailSlurpClient::Configuration.default.host).to eq('example.com')
|
22
|
-
end
|
23
|
-
|
24
|
-
it 'removes https from host' do
|
25
|
-
MailSlurpClient.configure { |c| c.host = 'https://wookiee.com' }
|
26
|
-
expect(MailSlurpClient::ApiClient.default.config.host).to eq('wookiee.com')
|
27
|
-
end
|
28
|
-
|
29
|
-
it 'removes trailing path from host' do
|
30
|
-
MailSlurpClient.configure { |c| c.host = 'hobo.com/v4' }
|
31
|
-
expect(MailSlurpClient::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
|
-
MailSlurpClient.configure { |c| c.base_path = 'v4/dog' }
|
38
|
-
expect(MailSlurpClient::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
|
-
MailSlurpClient.configure { |c| c.base_path = '/v4/dog' }
|
43
|
-
expect(MailSlurpClient::Configuration.default.base_path).to eq('/v4/dog')
|
44
|
-
end
|
45
|
-
|
46
|
-
it "ends up as a blank string if nil" do
|
47
|
-
MailSlurpClient.configure { |c| c.base_path = nil }
|
48
|
-
expect(MailSlurpClient::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) { MailSlurpClient::Configuration.new }
|
56
|
-
let(:api_client) { MailSlurpClient::ApiClient.new(config) }
|
57
|
-
|
58
|
-
it 'defaults to nil' do
|
59
|
-
expect(MailSlurpClient::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) { MailSlurpClient::Configuration.new }
|
75
|
-
let(:api_client) { MailSlurpClient::ApiClient.new(config) }
|
76
|
-
|
77
|
-
it 'defaults to 0' do
|
78
|
-
expect(MailSlurpClient::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 = MailSlurpClient::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 = MailSlurpClient::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 = MailSlurpClient::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 = MailSlurpClient::ApiClient.new
|
125
|
-
# _model = MailSlurpClient::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) { MailSlurpClient::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{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) { MailSlurpClient::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) { MailSlurpClient::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) { MailSlurpClient::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) { MailSlurpClient::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
|