Commit db32e704a9bf7735bd81015a5b4843bfd148fe8f
Committed by
Rafael Manzo
1 parent
0659957c
Exists in
colab
and in
4 other branches
Added unit tests for presence and numericality.
signed-off-by: Pedro Scocco <pedroscocco@gmail.com>
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
spec/models/reading_spec.rb
| @@ -11,6 +11,8 @@ describe Reading do | @@ -11,6 +11,8 @@ describe Reading do | ||
| 11 | 11 | ||
| 12 | it { should validate_presence_of(:label) } | 12 | it { should validate_presence_of(:label) } |
| 13 | it { should validate_presence_of(:color) } | 13 | it { should validate_presence_of(:color) } |
| 14 | + it { should validate_presence_of(:grade) } | ||
| 15 | + it { should validate_numericality_of(:grade) } | ||
| 14 | end | 16 | end |
| 15 | 17 | ||
| 16 | context 'kalibro validations' do | 18 | context 'kalibro validations' do |