Sha256: e5c9a2204401c346c9d46d96719350f868679d36605175bd0a8c424509435bfa
Contents?: true
Size: 541 Bytes
Versions: 31
Compression:
Stored size: 541 Bytes
Contents
require 'volt/router/routes' require 'volt/models' def routes(&block) @routes = Routes.new @routes.define(&block) end describe Routes do it "should match routes" do params = Model.new({}, persistor: Persistors::Params) params._controller = 'blog' params._index = '5' routes do get '/', _controller: 'index' get '/blog', _controller: 'blog' end path, cleaned_params = @routes.url_for_params(params) expect(path).to eq('/blog') expect(cleaned_params).to eq({_index: '5'}) end end
Version data entries
31 entries across 31 versions & 1 rubygems