CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/spec/lib/rex/proto/sms/model/smtp_spec.rb
Views: 1904
1
# -*- coding: binary -*-
2
require 'spec_helper'
3
4
RSpec.describe Rex::Proto::Sms::Model::Smtp do
5
6
let(:address) { 'example.com' }
7
let(:port) { 25 }
8
let(:username) { 'username' }
9
let(:password) { 'password' }
10
let(:login_type) { :login }
11
let(:from) { 'from' }
12
let(:helo_domain) { 'example.com'}
13
14
subject do
15
Rex::Proto::Sms::Model::Smtp.new(
16
address: address,
17
port: port,
18
username: username,
19
password: password,
20
login_type: login_type,
21
from: from,
22
helo_domain: helo_domain
23
)
24
end
25
26
describe '#initialize' do
27
it 'sets address' do
28
expect(subject.address).to eq(address)
29
end
30
31
it 'sets port' do
32
expect(subject.port).to eq(port)
33
end
34
35
it 'sets username' do
36
expect(subject.username).to eq(username)
37
end
38
39
it 'sets password' do
40
expect(subject.password).to eq(password)
41
end
42
43
it 'sets login_type' do
44
expect(subject.login_type).to eq(login_type)
45
end
46
47
it 'sets from' do
48
expect(subject.from).to eq(from)
49
end
50
51
it 'sets helo domain' do
52
expect(subject.helo_domain).to eq(helo_domain)
53
end
54
end
55
56
end
57
58