Sha256: 150f6faadf04c31961736d2d04f8334409179077970ecf0aab16ca3873a340e7

Contents?: true

Size: 684 Bytes

Versions: 2

Compression:

Stored size: 684 Bytes

Contents

require 'rails_helper'
require 'spec_helper'
require 'taxonomite/node'

module Taxonomite

  RSpec.describe TaxonomiteController, type: :controller do

    before :all do
      # populate the database prior to trying index/get
      @sample = FactoryGirl.create(:taxonomite_node)
    end

    describe "GET #index" do
      it "returns http success" do
        get :index
        expect(response).to have_http_status(:success)
      end
    end

    # really just test that an invalid id (=1) fails
    describe "GET #show" do
      it "returns http success" do
        get :show, :id => @sample.id
        expect(response).to have_http_status(:success)
      end
    end

  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
taxonomite-0.2.3 spec/controllers/taxonomite/taxonomite_controller_spec.rb
taxonomite-0.1.0 spec/controllers/taxonomite/taxonomite_controller_spec.rb