spec/rack/oauth2/util_spec.rb in rack-oauth2-1.1.1 vs spec/rack/oauth2/util_spec.rb in rack-oauth2-1.2.0
- old
+ new
@@ -18,12 +18,12 @@
subject { util.base64_encode '=+ .-/' }
it { should == 'PSsgLi0v' }
end
describe '.compact_hash' do
- subject { util.compact_hash :k1 => 'v1', :k2 => '', :k3 => nil }
- it { should == {:k1 => 'v1'} }
+ subject { util.compact_hash k1: 'v1', k2: '', k3: nil }
+ it { should == {k1: 'v1'} }
end
describe '.parse_uri' do
context 'when String is given' do
it { util.parse_uri(uri).should be_a URI::Generic }
@@ -53,11 +53,11 @@
end
describe '.redirect_uri' do
let(:base_uri) { 'http://client.example.com' }
let(:params) do
- {:k1 => :v1, :k2 => ''}
+ {k1: :v1, k2: ''}
end
subject { util.redirect_uri base_uri, location, params }
context 'when location = :fragment' do
let(:location) { :fragment }
@@ -92,6 +92,6 @@
util.uri_match?(uri, 'http://client.example.com/other').should == false
util.uri_match?(uri, 'http://attacker.example.com/callback').should == false
end
end
end
-end
\ No newline at end of file
+end