```ruby
# frozen_string_literal: true

require 'rails_helper'

module ApiSampler
  RSpec.describe Endpoint, type: :model do
    subject { FactoryGirl.build(:endpoint) }

    it { is_expected.to validate_presence_of(:path) }
    it { is_expected.to validate_uniqueness_of(:path) }
    it { is_expected.to have_many(:samples) }
  end
end
```

Test the presence of an index on api_sampler_endpoint(path)
user
```ruby
# frozen_string_literal: true

require 'rails_helper'

module ApiSampler
  RSpec.describe Endpoint, type: :model do
    subject { FactoryGirl.build(:endpoint) }

    it { is_expected.to validate_presence_of(:path) }
    it { is_expected.to validate_uniqueness_of(:path) }
    it { is_expected.to have_db_index(:path) }
    it { is_expected.to have_many(:samples) }
  end
end
```
assistant