-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DEV: update annotations, rspec session handling and test db
- Loading branch information
1 parent
f50c602
commit 5d88ef9
Showing
10 changed files
with
59 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,18 @@ | ||
# frozen_string_literal: true | ||
|
||
# == Schema Information | ||
# | ||
# Table name: subscription_client_requests | ||
# | ||
# id :bigint not null, primary key | ||
# request_id :bigint | ||
# request_type :string | ||
# expired_at :datetime | ||
# message :string | ||
# count :integer | ||
# response :json | ||
# created_at :datetime not null | ||
# updated_at :datetime not null | ||
# | ||
class SubscriptionClientRequest < ActiveRecord::Base | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# frozen_string_literal: true | ||
|
||
shared_context "session double" do | ||
let(:session_hash) { {} } | ||
|
||
before do | ||
session_double = instance_double(ActionDispatch::Request::Session, enabled?: true, loaded?: false) | ||
|
||
allow(session_double).to receive(:[]) do |key| | ||
session_hash[key] | ||
end | ||
|
||
allow(session_double).to receive(:[]=) do |key, value| | ||
session_hash[key] = value | ||
end | ||
|
||
allow(session_double).to receive(:delete) do |key| | ||
session_hash.delete(key) | ||
end | ||
|
||
allow(session_double).to receive(:clear) do |_key| | ||
session_hash.clear | ||
end | ||
|
||
allow(session_double).to receive(:fetch) do |key| | ||
session_hash.fetch(key) | ||
end | ||
|
||
allow(session_double).to receive(:key?) do |key| | ||
session_hash.key?(key) | ||
end | ||
|
||
allow_any_instance_of(ActionDispatch::Request) | ||
.to receive(:session).and_return(session_double) | ||
end | ||
end |