Commit 5e2a896123d5fa5818e7f9689082fac3217deb34
Committed by
João M. M. da Silva
1 parent
d4f2df64
Exists in
master
and in
28 other branches
[Mezuro] Completed process time model, fixtures and tests.
Showing
3 changed files
with
36 additions
and
0 deletions
Show diff stats
| ... | ... | @@ -0,0 +1,20 @@ |
| 1 | +require "test_helper" | |
| 2 | + | |
| 3 | +require "#{RAILS_ROOT}/plugins/mezuro/test/fixtures/process_time_fixtures" | |
| 4 | + | |
| 5 | +class ProcessTimeTest < ActiveSupport::TestCase | |
| 6 | + | |
| 7 | + def setup | |
| 8 | + @hash = ProcessTimeFixtures.process_time_hash | |
| 9 | + @process_time = ProcessTimeFixtures.process_time | |
| 10 | + end | |
| 11 | + | |
| 12 | + should 'create process time from hash' do | |
| 13 | + assert_equal @hash[:state], Kalibro::ProcessTime.new(@hash).state | |
| 14 | + end | |
| 15 | + | |
| 16 | + should 'convert process time to hash' do | |
| 17 | + assert_equal @hash, @process_time.to_hash | |
| 18 | + end | |
| 19 | + | |
| 20 | +end | ... | ... |