Sha256: c60dc1263fd91ee59394726e416d916ed7cc70dd045c308ea56e74c2f8ab1f5a

Contents?: true

Size: 504 Bytes

Versions: 7

Compression:

Stored size: 504 Bytes

Contents

require 'spec_helper'

describe "ReactiveRecord.load" do

  it "will not find a non-existing record" do
    React::IsomorphicHelpers.load_context
    ReactiveRecord.load do
      User.find_by_first_name("Jon").id
    end.then do |id|
      expect(id).to be_nil
    end
  end

  it "will find an existing record" do
    React::IsomorphicHelpers.load_context
    ReactiveRecord.load do
      User.find_by_email("todd@catprint.com").id
    end.then do |id|
      expect(id).not_to be_nil
    end
  end

end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hyper-mesh-0.6.0 reactive_record_test_app/spec-opal/active-record/reactive_record_load_spec.rb
hyper-mesh-0.5.4 reactive_record_test_app/spec-opal/active-record/reactive_record_load_spec.rb
hyper-mesh-0.5.3 reactive_record_test_app/spec-opal/active-record/reactive_record_load_spec.rb
hyper-mesh-0.5.2 reactive_record_test_app/spec-opal/active-record/reactive_record_load_spec.rb
hyper-mesh-0.5.1 reactive_record_test_app/spec-opal/active-record/reactive_record_load_spec.rb
hyper-mesh-0.5.0 reactive_record_test_app/spec-opal/active-record/reactive_record_load_spec.rb
hyper-mesh-0.4.0 reactive_record_test_app/spec-opal/active-record/reactive_record_load_spec.rb