Sha256: 7d62e8ec4d02ea6933777b0401c6bcbff0d4c1b7fdaedfbd8fbbfb80a993289e

Contents?: true

Size: 883 Bytes

Versions: 2

Compression:

Stored size: 883 Bytes

Contents

require 'spec_helper'

describe "Moxify routing" do
  
  it "should redirect on /refinery visit", :type => :request do
    get '/refinery'
    response.should redirect_to '/admin'
  end
  
  it "should redirect past refinery", :type => :request do
    get '/refinery/dialogs/images'
    response.should redirect_to '/admin/dialogs/images'
  end
  
  it "should override refinery root to /admin", :type => :request do
    refinery_root_path.should == "/admin"
  end
  
  it "should override plugin paths", :type => :request do
    [
      {name:'pages',path:'/admin/pages'},
      {name:'dashboard',path:'/admin/dashboard'},
      {name:'images',path:'/admin/images'},
      {name:'resources',path:'/admin/resources'},
      {name:'refinery_settings',path:'/admin/settings'}
    ].each do |plugin|
      eval("admin_#{plugin[:name]}_path").should == plugin[:path]
    end
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
moxify-0.1.7.1 spec/requests/routes_spec.rb
moxify-0.1.7 spec/requests/routes_spec.rb