summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/zero/request/accepttype/preferred_spec.rb21
1 files changed, 11 insertions, 10 deletions
diff --git a/spec/unit/zero/request/accepttype/preferred_spec.rb b/spec/unit/zero/request/accepttype/preferred_spec.rb
index ef21e8d..daeba86 100644
--- a/spec/unit/zero/request/accepttype/preferred_spec.rb
+++ b/spec/unit/zero/request/accepttype/preferred_spec.rb
@@ -14,16 +14,17 @@ describe Zero::Request::AcceptType, '#preferred' do
let(:lower_accept) { [lower_quality, default].join(',') }
context 'without mapping' do
- it { subject.new(html).preferred.should == html }
- it { subject.new(json).preferred.should == json }
- it { subject.new(option).preferred.should == foo }
- it { subject.new(simple_accept).preferred.should == html }
- it { subject.new(quality_accept).preferred.should == html }
- it { subject.new(random_accept).preferred.should == html }
- it { subject.new(lower_accept).preferred.should == foo }
- it { subject.new(nil).preferred.should == '*/*' }
- it { subject.new('').preferred.should == '*/*' }
- it { subject.new('text / html').preferred.should == html }
+ it { subject.new(html).preferred.should == html }
+ it { subject.new(json).preferred.should == json }
+ it { subject.new(option).preferred.should == foo }
+ it { subject.new(simple_accept).preferred.should == html }
+ it { subject.new(quality_accept).preferred.should == html }
+ it { subject.new(random_accept).preferred.should == html }
+ it { subject.new(lower_accept).preferred.should == foo }
+ it { subject.new(nil).preferred.should == '*/*' }
+ it { subject.new('').preferred.should == '*/*' }
+ it { subject.new('text / html').preferred.should == html }
+ it { subject.new("#{html};q=0.9,#{json}").preferred.should == json }
end
# context 'with mapping' do