Sha256: d67de6ce7633f795b5c044df96976c4d2ad76db11ccaf8bd2a365571392cb38f

Contents?: true

Size: 652 Bytes

Versions: 6

Compression:

Stored size: 652 Bytes

Contents

require File.dirname(__FILE__) + "/../../spec_helper"

describe Admin::SnippetController do
  scenario :users, :snippets

  integrate_views

  before :each do
    login_as :existing
  end

  it "should be an AbstractModelController" do
    controller.should be_kind_of(Admin::AbstractModelController)
  end

  it "should handle Snippets" do
    controller.class.model_class.should == Snippet
  end

  it "should require login for all actions" do
    logout
    lambda { get :index }.should require_login
    lambda { get :new }.should require_login
    lambda { get :edit }.should require_login
    lambda { get :remove }.should require_login
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
radiant-0.6.5.1 spec/controllers/admin/snippet_controller_spec.rb
radiant-0.6.5 spec/controllers/admin/snippet_controller_spec.rb
radiant-0.6.7 spec/controllers/admin/snippet_controller_spec.rb
radiant-0.6.6 spec/controllers/admin/snippet_controller_spec.rb
radiant-0.6.8 spec/controllers/admin/snippet_controller_spec.rb
radiant-0.6.9 spec/controllers/admin/snippet_controller_spec.rb