Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def strip_invisible_chars
- Util::Strings.strip_control_chars(params)
- end
- describe '#strip_invisible_chars' do
- let(:some) { {two: "three"} }
- subject { controller.send :strip_invisible_chars }
- before { allow(Util::Strings).to receive(:strip_control_chars).with(:params).and_return(:some) }
- context 'yes' do
- let(:params) { {one: "two"} }
- it 'returns result' do
- byebug
- expect(response.status).to eq 200
- end
- end
- context 'no' do
- let(:params) {}
- it 'returns result' do
- expect(response.status).to eq 400
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment