Sha256: e687e9d6e1839c9fa58cff0b57b6ee84bdb8124e22028091a2449be3f173fa48

Contents?: true

Size: 532 Bytes

Versions: 1

Compression:

Stored size: 532 Bytes

Contents

require 'spec_helper'

describe Applicants::Panel do
  it { should have_many :applicants }
  it { should have_db_column :remote_panel_id }

  describe "statistics" do
    it "should" do
      panel = Applicants::Panel.new
      panel.stub_chain(:applicants, :submitted_video_for_approval, :count).and_return(99)
      panel.stub_chain(:applicants, :with_state, :count).and_return(98)

      panel.statistics.should eq({
        applicants_submitted_video_for_approval: 99,
        applicants_approved: 98
      })
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
applicants-0.11.0 spec/models/applicants/panel_spec.rb