Sha256: 03334ec4626484648f884b5e4484f2c35d4470b917bba493e69318d5ca771b65

Contents?: true

Size: 678 Bytes

Versions: 19

Compression:

Stored size: 678 Bytes

Contents

require 'spec_helper'

describe "rearview/jobs/show" do
  let(:job) {
    create(:job)
  }
  let(:job_keys) {
    ["id",
     "userId",
     "dashboardId",
     "name",
     "cronExpr",
     "metrics",
     "monitorExpr",
     "minutes",
     "toDate",
     "description",
     "active",
     "status",
     "lastRun",
     "alertKeys",
     "errorTimeout",
     "createdAt",
     "modifiedAt"]
  }
  it "renders job json" do
    assign(:job,job)
    render :template => "rearview/jobs/show", :formats => :json, :handler => :jbuilder
    json = JSON.parse(rendered)
    job_keys.each { |k| expect(json).to include(k) }
    expect(json.keys.size).to eq(job_keys.size)
  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
rearview-1.1.2-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.1.1-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.1.0-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.3.rc.4-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.3.rc.3-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.3.rc.2-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.3.rc.1-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.2-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.2.rc.4-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.2.rc.3-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.2.rc.2-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.2.rc.1-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.1-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.0-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.0.rc5-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.0.rc4-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.0.rc3-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.0.rc2-jruby spec/views/jobs/show.json.jbuilder_spec.rb
rearview-1.0.0.rc1-jruby spec/views/jobs/show.json.jbuilder_spec.rb