Skip to content

Commit

Permalink
Whitespace cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
eedrummer committed Aug 27, 2014
1 parent 758d698 commit 3da1763
Showing 1 changed file with 14 additions and 17 deletions.
31 changes: 14 additions & 17 deletions test/unit/qme/quality_report_test.rb
Expand Up @@ -2,12 +2,12 @@

class QualityReportTest < MiniTest::Unit::TestCase
include QME::DatabaseAccess

def setup
load_system_js
collection_fixtures(get_db(), 'bundles')
collection_fixtures(get_db(), 'records')
collection_fixtures(get_db(), 'measures')
load_system_js
collection_fixtures(get_db(), 'bundles')
collection_fixtures(get_db(), 'records')
collection_fixtures(get_db(), 'measures')
get_db()['query_cache'].drop()
get_db()['patient_cache'].drop()
get_db()['query_cache'].insert(
Expand Down Expand Up @@ -45,7 +45,7 @@ def setup
},
"measure_id" => "test2",
"sub_id" => "b",
"effective_date" => Time.gm(2010, 9, 19).to_i
"effective_date" => Time.gm(2010, 9, 19).to_i
}
)
collection_fixtures(get_db(), 'delayed_backend_mongoid_jobs', '_id')
Expand All @@ -54,25 +54,25 @@ def setup
def test_calculated
qr = QME::QualityReport.find_or_create('test2', 'b', "effective_date" => Time.gm(2010, 9, 19).to_i)
assert qr.calculated?

qr = QME::QualityReport.find_or_create('test2', 'b', "effective_date" => Time.gm(2010, 9, 20).to_i)
assert !qr.calculated?
end

def test_result
qr = QME::QualityReport.find_or_create('test2', 'b', "effective_date" => Time.gm(2010, 9, 19).to_i)
result = qr.result

assert_equal 1, result[QME::QualityReport::NUMERATOR]
end

def test_destroy_all
QME::QualityReport.destroy_all

qr = QME::QualityReport.find_or_create('test2', 'b', "effective_date" => Time.gm(2010, 9, 19).to_i)
assert !qr.calculated?
end

def test_update_patient_results
qr = QME::QualityReport.find_or_create('test2', 'b', "effective_date" => Time.gm(2010, 9, 19).to_i)
assert qr.calculated?
Expand All @@ -84,7 +84,6 @@ def test_update_patient_results
end

def test_status

status = QME::MapReduce::MeasureCalculationJob.status('not really a job id')
assert_equal :complete, status
status = QME::MapReduce::MeasureCalculationJob.status("508aeff07042f9f88900000d")
Expand All @@ -107,7 +106,7 @@ def test_rollup_buffering

assert !qr.calculation_queued_or_running?
assert !qr2.calculation_queued_or_running?

qr.calculate({"oid_dictionary"=>{}},true)

assert qr.calculation_queued_or_running?
Expand All @@ -130,6 +129,4 @@ def test_rollup_buffering

assert_equal 0, Mongoid.default_session["rollup_buffer"].find({}).count
end


end
end

0 comments on commit 3da1763

Please sign in to comment.