Skip to content

Commit

Permalink
Add spec for identity model
Browse files Browse the repository at this point in the history
  • Loading branch information
ahukkanen committed Sep 25, 2023
1 parent 5bc9e37 commit 27c9e3e
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions spec/models/decidim/identity_spec.rb
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 27c9e3e

Please sign in to comment.