Sha256: e6b10d6a8f6de2824770813cfa0a4fc21e62fc3a2847435509760c384e70ea8a

Contents?: true

Size: 488 Bytes

Versions: 1

Compression:

Stored size: 488 Bytes

Contents

require 'spec_helper'

describe Applicants::Panels::StatisticsController do
  context "given no state" do
    it "explodes" do
      get :show, panel_id: "nonexistent", format: :json
      response.code.should eq("404")
    end

    it "doesn't explode" do
      panel = double("Panel", statistics: {a: 1})
      Applicants::Panel.stub_chain(:where, :first).and_return(panel)
      get :show, panel_id: "abc123", format: :json
      response.body.should eq("{\"a\":1}")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
applicants-0.11.0 spec/controllers/applicants/panels/statistics_controller_spec.rb