Sha256: 74577b63105541580bd1441cfa1b6156051cf1f911c1a2d1d10467aa6933e709

Contents?: true

Size: 575 Bytes

Versions: 24

Compression:

Stored size: 575 Bytes

Contents

require 'spec_helper'

describe "rearview/user/show" do
  let(:user) {
    create(:user)
  }
  let(:user_keys) {
    ["id",
     "email",
     "preferences",
     "firstName",
     "lastName",
     "lastLogin",
     "createdAt",
     "modifiedAt"]
  }
  it "renders user json" do
    assign(:user,user)
    render :template => "rearview/user/show", :formats => :json, :handler => :jbuilder
    json = JSON.parse(rendered)
    expect(json).to be_a_kind_of(Hash)
    user_keys.each { |k| expect(json).to include(k) }
    expect(json.keys.size).to eq(user_keys.size)
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rearview-1.2.3-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.2.2.rc.2-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.2.2.rc.1-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.2.1-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.2.0-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.1.2-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.1.1-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.1.0-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.0.3.rc.4-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.0.3.rc.3-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.0.3.rc.2-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.0.3.rc.1-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.0.2-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.0.2.rc.4-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.0.2.rc.3-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.0.2.rc.2-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.0.2.rc.1-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.0.1-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.0.0-jruby spec/views/user/show.json.jbuilder_spec.rb
rearview-1.0.0.rc5-jruby spec/views/user/show.json.jbuilder_spec.rb