CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
rapid7

Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.

GitHub Repository: rapid7/metasploit-framework
Path: blob/master/spec/lib/rex/proto/mms/model/smtp_spec.rb
Views: 11791
1
# -*- coding: binary -*-
2
require 'spec_helper'
3
4
RSpec.describe Rex::Proto::Mms::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::Mms::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