From 18a3edc7eb08b3f96b9b8d08ef5263af3c040ec7 Mon Sep 17 00:00:00 2001 From: Prosper Otemuyiwa Date: Tue, 16 Jan 2024 17:38:19 +0000 Subject: [PATCH] Revert "fix: update test suite to use named argument during client initialization" --- bin/console | 2 +- spec/blueprints_spec.rb | 3 ++- spec/changes_spec.rb | 3 ++- spec/environments_spec.rb | 3 ++- spec/events_spec.rb | 3 ++- spec/execution_details_spec.rb | 3 ++- spec/feeds_spec.rb | 3 ++- spec/inbound_parse_spec.rb | 3 ++- spec/integrations_spec.rb | 3 ++- spec/layouts_spec.rb | 3 ++- spec/messsages_spec.rb | 3 ++- spec/notification_groups_spec.rb | 3 ++- spec/notification_spec.rb | 3 ++- spec/notification_templates_spec.rb | 3 ++- spec/subscribers_spec.rb | 3 ++- spec/tenants_spec.rb | 3 ++- spec/topics_spec.rb | 3 ++- 17 files changed, 33 insertions(+), 17 deletions(-) diff --git a/bin/console b/bin/console index aa8aed6..283c1d4 100755 --- a/bin/console +++ b/bin/console @@ -12,4 +12,4 @@ require "novu" # Pry.start require "irb" -IRB.start(__FILE__) \ No newline at end of file +IRB.start(__FILE__) diff --git a/spec/blueprints_spec.rb b/spec/blueprints_spec.rb index c2d91dd..c2ebec7 100644 --- a/spec/blueprints_spec.rb +++ b/spec/blueprints_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::Blueprints do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } describe "#get_blueprint" do diff --git a/spec/changes_spec.rb b/spec/changes_spec.rb index 374e1c3..5e35a4e 100644 --- a/spec/changes_spec.rb +++ b/spec/changes_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::Changes do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } describe "#changes" do diff --git a/spec/environments_spec.rb b/spec/environments_spec.rb index d62161d..7334de9 100644 --- a/spec/environments_spec.rb +++ b/spec/environments_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::Environments do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } describe "#environment" do diff --git a/spec/events_spec.rb b/spec/events_spec.rb index 194e75b..b16cab6 100644 --- a/spec/events_spec.rb +++ b/spec/events_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::Events do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } describe "#trigger_event" do diff --git a/spec/execution_details_spec.rb b/spec/execution_details_spec.rb index 360d64e..c697583 100644 --- a/spec/execution_details_spec.rb +++ b/spec/execution_details_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::ExecutionDetails do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } describe "#execution_details" do diff --git a/spec/feeds_spec.rb b/spec/feeds_spec.rb index 29d27f5..10110e5 100644 --- a/spec/feeds_spec.rb +++ b/spec/feeds_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::Feeds do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } describe "#create_feed" do diff --git a/spec/inbound_parse_spec.rb b/spec/inbound_parse_spec.rb index c811f50..1db95a2 100644 --- a/spec/inbound_parse_spec.rb +++ b/spec/inbound_parse_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::InboundParse do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } let(:subscriber_id) { "63f71b3ef067290fa669106d" } diff --git a/spec/integrations_spec.rb b/spec/integrations_spec.rb index 29ab9a5..9876fbe 100644 --- a/spec/integrations_spec.rb +++ b/spec/integrations_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::Integrations do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } describe "#integrations" do diff --git a/spec/layouts_spec.rb b/spec/layouts_spec.rb index d2b2966..adcb0c2 100644 --- a/spec/layouts_spec.rb +++ b/spec/layouts_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::Layouts do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } let(:layout_id) { "63f71b3ef067290fa669106d" } diff --git a/spec/messsages_spec.rb b/spec/messsages_spec.rb index da81e02..8265678 100644 --- a/spec/messsages_spec.rb +++ b/spec/messsages_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::Messages do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } describe "#message" do diff --git a/spec/notification_groups_spec.rb b/spec/notification_groups_spec.rb index 3db05c2..063fd7b 100644 --- a/spec/notification_groups_spec.rb +++ b/spec/notification_groups_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::NotificationGroups do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } describe "#create_notification_group" do diff --git a/spec/notification_spec.rb b/spec/notification_spec.rb index e0fd5fc..23fc85e 100644 --- a/spec/notification_spec.rb +++ b/spec/notification_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::Notification do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } describe "#notifications" do diff --git a/spec/notification_templates_spec.rb b/spec/notification_templates_spec.rb index e7ab58e..6cd30cd 100644 --- a/spec/notification_templates_spec.rb +++ b/spec/notification_templates_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::NotificationTemplates do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } let(:template_id) { "63f71b3ef067290fa669106d" } diff --git a/spec/subscribers_spec.rb b/spec/subscribers_spec.rb index da1c543..b0541bb 100644 --- a/spec/subscribers_spec.rb +++ b/spec/subscribers_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::Subscribers do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } let(:subscriber_id) { "63f71b3ef067290fa669106d" } diff --git a/spec/tenants_spec.rb b/spec/tenants_spec.rb index d33e527..cfeed41 100644 --- a/spec/tenants_spec.rb +++ b/spec/tenants_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::Tenants do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } let(:identifier) { "a_unique_string" } diff --git a/spec/topics_spec.rb b/spec/topics_spec.rb index e67857a..3a91fb5 100644 --- a/spec/topics_spec.rb +++ b/spec/topics_spec.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true +require "spec_helper" require_relative "../lib/novu" RSpec.describe Novu::Api::Topics do let(:access_token) { "1234567890" } - let(:client) { Novu::Client.new(access_token: access_token) } + let(:client) { Novu::Client.new(access_token) } let(:base_uri) { "https://api.novu.co/v1" } let(:topic_key) { "test-topic" }