Sha256: 555a153d1761d458d55934961d1430fbc15f66e277c1ecc3beafc69623da2344
Contents?: true
Size: 620 Bytes
Versions: 1
Compression:
Stored size: 620 Bytes
Contents
# frozen_string_literal: true describe PUNK, "GET /sessions" do include_context "Punk" context "when the user is not authenticated" do before do get "/sessions" end it { is_expected.not_to be_successful } end context "when the user is authenticated" do let(:user) { create(:user) } let(:identity) { create(:identity, user: user, claim_type: "phone") } before do login(identity.claim) get "/sessions" end after do logout end it { is_expected.to be_successful } its(:body) { is_expected.to match(user.active_sessions.first.id) } end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
punk-0.4.1 | spec/routes/sessions/get_sessions_spec.rb |