diff --git a/Gemfile.lock b/Gemfile.lock index 4f1e056bc..4df118291 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -9,63 +9,63 @@ GIT GEM remote: https://rubygems.org/ specs: - actioncable (6.1.4.3) - actionpack (= 6.1.4.3) - activesupport (= 6.1.4.3) + actioncable (6.1.4.6) + actionpack (= 6.1.4.6) + activesupport (= 6.1.4.6) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.1.4.3) - actionpack (= 6.1.4.3) - activejob (= 6.1.4.3) - activerecord (= 6.1.4.3) - activestorage (= 6.1.4.3) - activesupport (= 6.1.4.3) + actionmailbox (6.1.4.6) + actionpack (= 6.1.4.6) + activejob (= 6.1.4.6) + activerecord (= 6.1.4.6) + activestorage (= 6.1.4.6) + activesupport (= 6.1.4.6) mail (>= 2.7.1) - actionmailer (6.1.4.3) - actionpack (= 6.1.4.3) - actionview (= 6.1.4.3) - activejob (= 6.1.4.3) - activesupport (= 6.1.4.3) + actionmailer (6.1.4.6) + actionpack (= 6.1.4.6) + actionview (= 6.1.4.6) + activejob (= 6.1.4.6) + activesupport (= 6.1.4.6) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.1.4.3) - actionview (= 6.1.4.3) - activesupport (= 6.1.4.3) + actionpack (6.1.4.6) + actionview (= 6.1.4.6) + activesupport (= 6.1.4.6) rack (~> 2.0, >= 2.0.9) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.1.4.3) - actionpack (= 6.1.4.3) - activerecord (= 6.1.4.3) - activestorage (= 6.1.4.3) - activesupport (= 6.1.4.3) + actiontext (6.1.4.6) + actionpack (= 6.1.4.6) + activerecord (= 6.1.4.6) + activestorage (= 6.1.4.6) + activesupport (= 6.1.4.6) nokogiri (>= 1.8.5) - actionview (6.1.4.3) - activesupport (= 6.1.4.3) + actionview (6.1.4.6) + activesupport (= 6.1.4.6) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) active_record_query_trace (1.8) - activejob (6.1.4.3) - activesupport (= 6.1.4.3) + activejob (6.1.4.6) + activesupport (= 6.1.4.6) globalid (>= 0.3.6) - activemodel (6.1.4.3) - activesupport (= 6.1.4.3) - activerecord (6.1.4.3) - activemodel (= 6.1.4.3) - activesupport (= 6.1.4.3) + activemodel (6.1.4.6) + activesupport (= 6.1.4.6) + activerecord (6.1.4.6) + activemodel (= 6.1.4.6) + activesupport (= 6.1.4.6) activerecord-import (1.2.0) activerecord (>= 3.2) - activestorage (6.1.4.3) - actionpack (= 6.1.4.3) - activejob (= 6.1.4.3) - activerecord (= 6.1.4.3) - activesupport (= 6.1.4.3) + activestorage (6.1.4.6) + actionpack (= 6.1.4.6) + activejob (= 6.1.4.6) + activerecord (= 6.1.4.6) + activesupport (= 6.1.4.6) marcel (~> 1.0.0) mini_mime (>= 1.1.0) - activesupport (6.1.4.3) + activesupport (6.1.4.6) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 1.6, < 2) minitest (>= 5.1) @@ -300,7 +300,7 @@ GEM mime-types (~> 3.0) multi_xml (>= 0.5.2) httpclient (2.8.3) - i18n (1.8.11) + i18n (1.9.1) concurrent-ruby (~> 1.0) image_processing (1.12.1) mini_magick (>= 4.9.5, < 5) @@ -346,7 +346,7 @@ GEM listen (3.7.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) - loofah (2.13.0) + loofah (2.14.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) @@ -400,7 +400,7 @@ GEM pry-rails (0.3.9) pry (>= 0.10.4) public_suffix (4.0.6) - puma (5.5.2) + puma (5.6.2) nio4r (~> 2.0) pundit (2.1.1) activesupport (>= 3.0.0) @@ -416,29 +416,29 @@ GEM rack-test (1.1.0) rack (>= 1.0, < 3) rack-timeout (0.6.0) - rails (6.1.4.3) - actioncable (= 6.1.4.3) - actionmailbox (= 6.1.4.3) - actionmailer (= 6.1.4.3) - actionpack (= 6.1.4.3) - actiontext (= 6.1.4.3) - actionview (= 6.1.4.3) - activejob (= 6.1.4.3) - activemodel (= 6.1.4.3) - activerecord (= 6.1.4.3) - activestorage (= 6.1.4.3) - activesupport (= 6.1.4.3) + rails (6.1.4.6) + actioncable (= 6.1.4.6) + actionmailbox (= 6.1.4.6) + actionmailer (= 6.1.4.6) + actionpack (= 6.1.4.6) + actiontext (= 6.1.4.6) + actionview (= 6.1.4.6) + activejob (= 6.1.4.6) + activemodel (= 6.1.4.6) + activerecord (= 6.1.4.6) + activestorage (= 6.1.4.6) + activesupport (= 6.1.4.6) bundler (>= 1.15.0) - railties (= 6.1.4.3) + railties (= 6.1.4.6) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) rails-html-sanitizer (1.4.2) loofah (~> 2.3) - railties (6.1.4.3) - actionpack (= 6.1.4.3) - activesupport (= 6.1.4.3) + railties (6.1.4.6) + actionpack (= 6.1.4.6) + activesupport (= 6.1.4.6) method_source rake (>= 0.13) thor (~> 1.0) @@ -583,7 +583,7 @@ GEM squasher (0.6.2) statsd-ruby (1.5.0) telephone_number (1.4.12) - thor (1.1.0) + thor (1.2.1) tilt (2.0.10) time_diff (0.3.0) activesupport @@ -635,7 +635,7 @@ GEM websocket-extensions (>= 0.1.0) websocket-extensions (0.1.5) wisper (2.0.0) - zeitwerk (2.5.1) + zeitwerk (2.5.4) PLATFORMS arm64-darwin-20 diff --git a/spec/controllers/api/v1/accounts/campaigns_controller_spec.rb b/spec/controllers/api/v1/accounts/campaigns_controller_spec.rb index e4036ee5a..219e8f0b9 100644 --- a/spec/controllers/api/v1/accounts/campaigns_controller_spec.rb +++ b/spec/controllers/api/v1/accounts/campaigns_controller_spec.rb @@ -131,11 +131,12 @@ RSpec.describe 'Campaigns API', type: :request do twilio_inbox = create(:inbox, channel: twilio_sms) label1 = create(:label, account: account) label2 = create(:label, account: account) + scheduled_at = 2.days.from_now post "/api/v1/accounts/#{account.id}/campaigns", params: { inbox_id: twilio_inbox.id, title: 'test', message: 'test message', - scheduled_at: 2.days.from_now, + scheduled_at: scheduled_at, audience: [{ type: 'Label', id: label1.id }, { type: 'Label', id: label2.id }] }, headers: administrator.create_new_auth_token, @@ -145,7 +146,7 @@ RSpec.describe 'Campaigns API', type: :request do response_data = JSON.parse(response.body, symbolize_names: true) expect(response_data[:campaign_type]).to eq('one_off') expect(response_data[:scheduled_at].present?).to eq true - expect(response_data[:scheduled_at]).to eq(2.days.from_now.to_i) + expect(response_data[:scheduled_at]).to eq(scheduled_at.to_i) expect(response_data[:audience].pluck(:id)).to include(label1.id, label2.id) end end