Sha256: d68d87cc604fb48a0f1bc6ee64128f97ca60341e7ada0250872a12d58e8f4144

Contents?: true

Size: 926 Bytes

Versions: 2

Compression:

Stored size: 926 Bytes

Contents

require 'spec_helper'

describe Aeternitas::WebUi::DashboardController, type: :controller do
  routes { Aeternitas::WebUi::Engine.routes }

  describe "#index" do
    it 'renders the dashboard page' do
      get :index
      expect(response).to have_http_status(:success)
    end
  end

  describe "#poll_times" do
    it 'renders polling timeline' do
      get :polls_timeline, params: {from: 3.days.ago.to_s, to: Time.now.to_s, format: :json}
      expect(response).to have_http_status(:success)
    end
  end

  describe "#future_polls" do
    it 'renders future polls data' do
      get :future_polls, format: :json
      expect(response).to have_http_status(:success)
    end
  end

  describe "#pollable_growth" do
    it 'renders pollable growth data' do
      get :pollable_growth, params: {from: 3.days.ago.to_s, to: Time.now.to_s, format: :json}
      expect(response).to have_http_status(:success)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
aeternitas_web_ui-0.2.1 spec/controllers/dashboard_controller_spec.rb
aeternitas_web_ui-0.2.0 spec/controllers/dashboard_controller_spec.rb