File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed
spec/lib/msf/core/rpc/v10 Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change
1
+ # -*- coding:binary -*-
2
+ require 'spec_helper'
3
+
4
+ require 'msf/core/rpc/v10/rpc_base'
5
+ require 'msf/core/rpc/v10/rpc_core'
6
+ require 'msf/core/rpc/v10/service'
7
+
8
+ describe Msf ::RPC ::RPC_Core do
9
+ include_context 'Msf::Simple::Framework'
10
+
11
+ let ( :service ) do
12
+ Msf ::RPC ::Service . new ( framework )
13
+ end
14
+
15
+ let ( :core ) do
16
+ Msf ::RPC ::RPC_Core . new ( service )
17
+ end
18
+
19
+ describe '#rpc_getg' do
20
+ it 'should show an empty value if the variable is unset' do
21
+ expect ( core . rpc_getg ( 'FOO' ) ) . to eq ( { 'FOO' => '' } )
22
+ end
23
+ it 'should show the correct value if the variable is set' do
24
+ core . rpc_setg ( 'FOO' , 'BAR' )
25
+ expect ( core . rpc_getg ( 'FOO' ) ) . to eq ( { 'FOO' => 'BAR' } )
26
+ end
27
+ end
28
+ end
You can’t perform that action at this time.
0 commit comments