cfoundry 2.3.0 → 2.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -15,7 +15,7 @@ module CFoundry::V2::ModelMagic
15
15
  #
16
16
  define_method(name) do
17
17
  return @cache[name] if @cache.key?(name)
18
- return @client.send(name) unless persisted?
18
+ return @client.send(association_name) unless persisted?
19
19
 
20
20
  @cache[name] =
21
21
  if @manifest && @manifest[:entity].key?(name)
@@ -1,4 +1,4 @@
1
1
  module CFoundry # :nodoc:
2
2
  # CFoundry library version number.
3
- VERSION = "2.3.0".freeze
3
+ VERSION = "2.3.1".freeze
4
4
  end
@@ -10,6 +10,18 @@ module CFoundry
10
10
  expect(domain.spaces).to eq([space])
11
11
  end
12
12
 
13
+ describe "#owning_organization" do
14
+ context "when the domain is not persisted" do
15
+ let(:client) { build(:client) }
16
+ let(:domain) { build(:domain, client: client, guid: nil)}
17
+ it "asdf" do
18
+ client.should_not_receive(:owning_organization)
19
+ client.should_receive(:organization)
20
+ domain.owning_organization
21
+ end
22
+ end
23
+ end
24
+
13
25
  describe "validations" do
14
26
  subject { build(:domain) }
15
27
  it { should validate_presence_of(:name) }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cfoundry
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.3.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2013-07-01 00:00:00.000000000 Z
13
+ date: 2013-07-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activemodel