blob: 5a3964b483da83a45e7f7cd7ebc6c0dabd0c163e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
require 'spec_helper'
describe Zero::Request::Parameter, '#query' do
subject { Zero::Request::Parameter.new(env) }
context "without parameters" do
let(:env) { EnvGenerator.get('/foo') }
its(:query) { should == {} }
end
context "with a query string" do
let(:env) { EnvGenerator.get('/foo?bar=baz') }
its(:query) { should == {'bar' => 'baz'} }
end
context "with a post body" do
let(:env) { EnvGenerator.post('/foo', {:input => 'bar=baz'}) }
its(:query) { should == {} }
end
end
|