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/sms/model/message_spec.rb
Views: 11791
1
require 'spec_helper'
2
3
RSpec.describe Rex::Proto::Sms::Model::Message do
4
5
let(:message) { 'message' }
6
let(:from) { '[email protected]' }
7
let(:to) { '[email protected]' }
8
let(:sms_subject) { 'subject' }
9
10
subject do
11
described_class.new(
12
from: from,
13
to: to,
14
subject: sms_subject,
15
message: message,
16
)
17
end
18
19
describe '#initialize' do
20
it 'sets message' do
21
expect(subject.message).to eq(message)
22
end
23
24
it 'sets from' do
25
expect(subject.from).to eq(from)
26
end
27
28
it 'sets to' do
29
expect(subject.to).to eq(to)
30
end
31
32
it 'sets subject' do
33
expect(subject.subject).to eq(sms_subject)
34
end
35
end
36
37
describe '#to_s' do
38
it 'returns the sms message' do
39
expect(subject.to_s).to include(message)
40
end
41
end
42
43
end
44
45