Skip to content

Instantly share code, notes, and snippets.

View annaswims's full-sized avatar

Anna Carey annaswims

  • Indianapolis, IN
View GitHub Profile
# vets-api/app/swagger/requests/profile.rb
module Swagger
module Requests
class Profile
include Swagger::Blocks
swagger_path '/v0/profile/email' do
operation :get do
extend Swagger::Responses::AuthenticationError
# vets-api/app/controllers/v0/profile/emails_controller.rb
module V0
module Profile
class EmailsController < ApplicationController
before_action { authorize :evss, :access? }
# Fetches the email address, and its effective datetime, for the current user
#
# @return [Response] Sample response.body:
# vets-api/lib/evss/pciu/service.rb
require 'common/client/base'
module EVSS
module PCIU
class Service < EVSS::Service
include Common::Client::Monitoring
configuration EVSS::PCIU::Configuration

Request Spec

# vets-api/spec/request/email_request_spec.rb

describe 'GET /v0/profile/email' do
  it 'should match the email schema' do
    VCR.use_cassette('evss/pciu/email') do
      get '/v0/profile/email', nil, auth_header