Sha256: bc2508cb31e94d5d41119727a87a688d6a95043e4f9aba285f7c5d8ea4f65b16

Contents?: true

Size: 752 Bytes

Versions: 19

Compression:

Stored size: 752 Bytes

Contents

require 'spec_helper'

describe OrdersController do

  before do
    @requisition_id = 170420
    @user = SampleUser
    lab_order = LabTestOrder.new(@requisition_id, @user)
    @user.lab_order = lab_order
  end

  it "#download_requisition" do
    any_instance_of(OrdersController, :current_user => @user)
    stub_order_requisition(@requisition_id, medivo_xml_fixture_path("lc_order_with_requisition.xml"))

    get :download_requisition
    response.body.should match /^%PDF/
  end

  it "#download_result" do
    any_instance_of(OrdersController, :current_user => @user)
    stub_order_result(@requisition_id, medivo_xml_fixture_path("lc_order_with_positive_results.xml"))

    get :download_result
    response.body.should match /^%PDF/
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
medivo-0.2.24 spec/controllers/orders_controller_spec.rb
medivo-0.2.21 spec/controllers/orders_controller_spec.rb
medivo-0.2.20 spec/controllers/orders_controller_spec.rb
medivo-0.2.19 spec/controllers/orders_controller_spec.rb
medivo-0.2.18 spec/controllers/orders_controller_spec.rb
medivo-0.2.17 spec/controllers/orders_controller_spec.rb
medivo-0.2.16 spec/controllers/orders_controller_spec.rb
medivo-0.2.15 spec/controllers/orders_controller_spec.rb
medivo-0.2.14 spec/controllers/orders_controller_spec.rb
medivo-0.2.13 spec/controllers/orders_controller_spec.rb
medivo-0.2.12 spec/controllers/orders_controller_spec.rb
medivo-0.2.11 spec/controllers/orders_controller_spec.rb
medivo-0.2.10 spec/controllers/orders_controller_spec.rb
medivo-0.2.9 spec/controllers/orders_controller_spec.rb
medivo-0.2.8 spec/controllers/orders_controller_spec.rb
medivo-0.2.7 spec/controllers/orders_controller_spec.rb
medivo-0.2.6 spec/controllers/orders_controller_spec.rb
medivo-0.2.5 spec/controllers/orders_controller_spec.rb
medivo-0.2.3 spec/controllers/orders_controller_spec.rb