Sha256: 24ea94027b10a339dee9eb2883ee1a607ce1ed14342d83d0ebe2ca5655217336
Contents?: true
Size: 503 Bytes
Versions: 3
Compression:
Stored size: 503 Bytes
Contents
shared_examples "needs authorization" do context "without authentication" do before do current_session.header('X-User-Token', nil) current_session.header('X-User-Email', nil) end it_behaves_like "an unauthorized JSON request" end context "with invalid authentication" do before { build(:authentication, user: not_existing_user).set_headers(current_session) } let(:not_existing_user) { build(:user) } it_behaves_like "an unauthorized JSON request" end end
Version data entries
3 entries across 3 versions & 1 rubygems