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