Sha256: adc10f60d7cd18895727b4e2fc77d6580ae2870c491f52eb81d7364beed5392d

Contents?: true

Size: 716 Bytes

Versions: 1

Compression:

Stored size: 716 Bytes

Contents

require 'spec_helper'
require 'ronin/db/http_query_param_name'

describe Ronin::DB::HTTPQueryParamName do
  it "must use the 'ronin_http_query_param_names' table" do
    expect(described_class.table_name).to eq('ronin_http_query_param_names')
  end

  let(:name) { 'foo' }

  describe "validations" do
    describe "name" do
      it "should require name attribute" do
        http_query_param_name = described_class.new
        expect(http_query_param_name).to_not be_valid
        expect(http_query_param_name.errors[:name]).to eq(
          ["can't be blank"]
        )

        http_query_param_name = described_class.new(name: name)
        expect(http_query_param_name).to be_valid
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
ronin-db-activerecord-0.1.0.beta1 spec/http_query_param_name_spec.rb