From 27c9e3e620fe9fea58dbe06b660553bd55a9c465 Mon Sep 17 00:00:00 2001 From: Antti Hukkanen Date: Mon, 25 Sep 2023 18:04:10 +0300 Subject: [PATCH] Add spec for identity model --- spec/models/decidim/identity_spec.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 spec/models/decidim/identity_spec.rb diff --git a/spec/models/decidim/identity_spec.rb b/spec/models/decidim/identity_spec.rb new file mode 100644 index 0000000..a35d761 --- /dev/null +++ b/spec/models/decidim/identity_spec.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +require "spec_helper" + +describe Decidim::Identity do + let!(:identity) { create(:identity, user: user) } + let(:organization) { create(:organization) } + let(:user) { create(:user, :confirmed, organization: organization) } + + describe "#user" do + subject { Decidim::Identity.last.user } + + it "knows its user" do + expect(subject).to eq(user) + end + end +end