Sha256: d5cc105306627618cfc4668e276138e3f403f9ee6034fd18571f11628032543d

Contents?: true

Size: 552 Bytes

Versions: 3

Compression:

Stored size: 552 Bytes

Contents

require 'spec_helper'

module Bookkeeper
  describe Account do
    context "model attributes validations" do
      it "is valid with a numeric balance" do
        expect(build(:bookkeeper_account)).to be_valid
      end

      # it "has a start date corresponding to the first movement creation date" do
      #   expect(build(:bookkeeper_balance)).to be_valid
      # end

      it "is invalid with a not-numeric balance" do
        expect(build(:bookkeeper_account, balance: 'not_valid')).to have(1).errors_on(:balance)
      end
    end
  end
end


Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
bookkeeper-0.0.7 spec/models/bookkeeper/account_spec.rb
bookkeeper-0.0.6 spec/models/bookkeeper/account_spec.rb
bookkeeper-0.0.5 spec/models/bookkeeper/account_spec.rb