In these cases, I normally use the UUID
'12345678-1234-1234-1234-123456789012' -- it will pass any of our UUID
format checks, but will 'never' be assigned by the API. It's also obviously
made up.



On Thu, May 29, 2014 at 10:58 AM, Dan Carley <notifications@github.com>wrote:

> In spec/integration/edge_gateway/edge_gateway_spec.rb:
>
> > +        let(:network_1_id)         { @test_data.network_1_id }
> > +
> > +        it "returns a provider network" do
> > +          network_interface = edge_gateway.vcloud_gateway_interface_by_id(provider_network_id)
> > +          expect(network_interface[:Network]).not_to be_nil
> > +          expect(network_interface[:Network][:href]).to include(provider_network_id)
> > +        end
> > +
> > +        it "returns an orgVdcNetwork" do
> > +          network_interface = edge_gateway.vcloud_gateway_interface_by_id(network_1_id)
> > +          expect(network_interface[:Network]).not_to be_nil
> > +          expect(network_interface[:Network][:href]).to include(network_1_id)
> > +        end
> > +
> > +        it "returns nil if network with given ID is not found" do
> > +          network_interface = edge_gateway.vcloud_gateway_interface_by_id(SecureRandom.uuid)
>
> Although chances of this generating a matching UUID are incredibly slim, I
> think it'd be better to use a bogus string that will never match and
> doesn't change on each run.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/alphagov/vcloud-core/pull/66/files#r13174944>
> .
>