diff --git a/app/controllers/webhooks/sms/generic_controller.rb b/app/controllers/webhooks/sms/generic_controller.rb index bfd398f..2b089f1 100644 --- a/app/controllers/webhooks/sms/generic_controller.rb +++ b/app/controllers/webhooks/sms/generic_controller.rb @@ -7,7 +7,7 @@ class GenericController < WebhooksController def inbound_sms adapter = ::SmsAdapters::GenericAdapter.new(params) - Sms::Create.new(adapter).call + ::Sms::Create.new(adapter).call head :ok rescue ActiveRecord::RecordNotFound head :bad_request diff --git a/spec/fabricators/phone_number_fabricator.rb b/spec/fabricators/phone_number_fabricator.rb index 75c9ce7..538ef4a 100644 --- a/spec/fabricators/phone_number_fabricator.rb +++ b/spec/fabricators/phone_number_fabricator.rb @@ -3,4 +3,5 @@ Fabricator(:phone_number) do number { Faker::PhoneNumber.cell_phone_in_e164 } available true + country_iso3166 { Faker::Address.country_code } end diff --git a/spec/helpers/phones_helper_spec.rb b/spec/helpers/phones_helper_spec.rb deleted file mode 100644 index 6e90818..0000000 --- a/spec/helpers/phones_helper_spec.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -# Specs in this file have access to a helper object that includes -# the PhonesHelper. For example: -# -# describe PhonesHelper do -# describe "string concat" do -# it "concats two strings with spaces" do -# expect(helper.concat_strings("this","that")).to eq("this that") -# end -# end -# end -RSpec.describe PhonesHelper, type: :helper do - pending "add some examples to (or delete) #{__FILE__}" -end diff --git a/spec/requests/phones_request_spec.rb b/spec/requests/phones_request_spec.rb deleted file mode 100644 index 79c1e6f..0000000 --- a/spec/requests/phones_request_spec.rb +++ /dev/null @@ -1,12 +0,0 @@ -# frozen_string_literal: true - -require 'rails_helper' - -RSpec.describe 'Phones', type: :request do - describe 'GET /index' do - it 'returns http success' do - get '/phones/index' - expect(response).to have_http_status(:success) - end - end -end diff --git a/spec/requests/webhooks/sendgrid_controller_request_spec.rb b/spec/requests/webhooks/sendgrid_controller_request_spec.rb index 691514f..9cda12f 100644 --- a/spec/requests/webhooks/sendgrid_controller_request_spec.rb +++ b/spec/requests/webhooks/sendgrid_controller_request_spec.rb @@ -2,7 +2,7 @@ require 'rails_helper' -RSpec.describe Webhooks::Sms::SendgridController, type: :request do +RSpec.describe Webhooks::SendgridController, type: :request do describe 'POST /email_inbound' do let!(:mailbox) { Fabricate :mailbox }