"use strict";

var _index = require("./index");

var _testUtils = require("../utils/test-utils");

describe('Latitude Tests', () => {
  const model = {
    latitude: _index.Latitude
  };
  test('Latitude is a number that can have a decimal, be negative or positive', () => {
    expect((0, _testUtils.propTypeErrors)(model, {
      latitude: 50.3
    })).toBeFalsy();
    expect((0, _testUtils.propTypeErrors)(model, {
      latitude: 30
    })).toBeFalsy();
    expect((0, _testUtils.propTypeErrors)(model, {
      latitude: -24.0
    })).toBeFalsy();
    expect((0, _testUtils.propTypeErrors)(model, {
      latitude: '50.30'
    })).toBeTruthy();
    expect((0, _testUtils.propTypeErrors)(model, {
      latitude: '30'
    })).toBeTruthy();
    expect((0, _testUtils.propTypeErrors)(model, {
      latitude: '-24.00'
    })).toBeTruthy();
  });
  test('Maximum Latitude is 90.00', () => {
    expect((0, _testUtils.propTypeErrors)(model, {
      latitude: 90.0
    })).toBeFalsy();
    expect((0, _testUtils.propTypeErrors)(model, {
      latitude: 90.01
    })).toBeTruthy();
    expect((0, _testUtils.propTypeErrors)(model, {
      latitude: 91.0
    })).toBeTruthy();
  });
  test('Minimum Latitude is -90.00', () => {
    expect((0, _testUtils.propTypeErrors)(model, {
      latitude: -90.0
    })).toBeFalsy();
    expect((0, _testUtils.propTypeErrors)(model, {
      latitude: -90.01
    })).toBeTruthy();
    expect((0, _testUtils.propTypeErrors)(model, {
      latitude: -91.0
    })).toBeTruthy();
  });
});