Sha256: 88fd63c541c33ca49afe8845555f52aab688bef206950ebbbdae03384e061f6a

Contents?: true

Size: 595 Bytes

Versions: 2

Compression:

Stored size: 595 Bytes

Contents

require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')

describe IfFalseController do
  include RSpec::Rails::ControllerExampleGroup
  
  it "should not allow the attribute" do
    begin
      post :create, :foo => "hi"
      raise "should fail"
    rescue ParamAccessible::Error => e
      e.inaccessible_params.should == %w(foo)
    end
  end
  
  it "should not allow the nested attribute" do
    begin
      post :create, :bar => {:baz => "hi"}
      raise "should fail"
    rescue ParamAccessible::Error => e
      e.inaccessible_params.should == %w(bar)
    end
  end
  
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
param_accessible-0.0.2 spec/lib/if_false_spec.rb
param_accessible-0.0.1 spec/lib/if_false_spec.rb