Sha256: cb2b0a298954a57a80df5691cd1948830d4cd2f14247ace7f52b7019b376726e
Contents?: true
Size: 912 Bytes
Versions: 11
Compression:
Stored size: 912 Bytes
Contents
require "spec_helper" module SocialNetworking module Reports RSpec.describe Nudge do fixtures :all def data @data ||= SocialNetworking::Reports::Nudge.all end describe ".all" do context "when no nudges performed" do it "returns an empty array" do SocialNetworking::Nudge.destroy_all expect(data).to be_empty end end context "when nudges performed" do it "returns accurate summaries" do participant = participants(:participant1) nudge = SocialNetworking::Nudge.first expect(data.count).to eq 4 expect(data).to include( participant_id: participant.study_id, occurred_at: nudge.created_at.iso8601, recipient_id: nudge.recipient.study_id ) end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems