Sha256: 7a16e8b348e48fa30490f0371eb5255f7b4a2f3dbe46cda1c75d0667c6ededc9

Contents?: true

Size: 674 Bytes

Versions: 1

Compression:

Stored size: 674 Bytes

Contents

require "rails_helper"
require "paper_trail"
require "ransack"
require "paper_trail/frameworks/active_record/models/paper_trail/version"
require 'haml'

describe PaperTrailUi::ReportsController, type: :controller do
  describe "#index" do
    it "should render the index view" do
      get :index, {use_route: :paper_trail_ui}

      expect(response).to render_template("index")
    end
  end
  
  describe "#show" do
    it "should render the show view" do
      item = PaperTrail::Version.create!(event: "create", item_type: "Test", item_id: 1)
      get :show, {id: item.id, use_route: :paper_trail_ui}

      expect(response).to render_template("show")
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
paper_trail_ui-0.0.2 spec/controllers/paper_trail_ui/reports_controller_spec.rb