spec/models/hatchy/bank_spec.rb in hatchy-0.0.6.pre vs spec/models/hatchy/bank_spec.rb in hatchy-0.0.7.pre
- old
+ new
@@ -1,7 +1,13 @@
require 'rails_helper'
-
module Hatchy
RSpec.describe Bank, type: :model do
- pending "add some examples to (or delete) #{__FILE__}"
+ let(:bank){ FactoryGirl.create(:bank) }
+
+ describe "validations" do
+ it { should validate_presence_of(:name) }
+ it { should validate_presence_of(:code) }
+ it { should validate_uniqueness_of(:code) }
+ end
+
end
-end
+end
\ No newline at end of file