This file contains hidden or 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
def possible_duplicate_ach_instructions_workflow | |
completed_link_workflows = RegisterLinkWorkflow.where(status: "in_progress") | |
duplicate_link_workflows = completed_link_workflows.select do |link_workflow| | |
user = link_workflow.user | |
link = link_workflow.link | |
managed_account = link.first_account | |
bank_account = link.second_account | |
managed_account | |
.account_links |
This file contains hidden or 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
class DateClass | |
def current | |
Date.current | |
end | |
end | |
describe DateClass do | |
describe "#current" do | |
it "returns the current date" do | |
expected_date = Date.current # created at 23:59:59 |
This file contains hidden or 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
# BulkEnrollmentPortfolioAdviceTemplate | |
module Advice | |
module Templates | |
class BulkEnrollmentPortfolioAdviceTemplate < PortfolioAdviceTemplate | |
def accounts | |
@accounts, @considered_accounts = super.partition do |account| | |
options[:target_account_ids].include?(account.id) | |
end | |
@accounts | |
end |
This file contains hidden or 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
## Prelimininary Setup | |
* Download and install |
This file contains hidden or 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
git rebase -i HEAD~N // where N is number of prev commits you want to use | |
e.g. git rebase -i HEAD~3 // returns last 3 commits | |
p commit1 (3rd latest) | |
p commit2 | |
p commit3 (latest) | |
re-ordering the latest with the 3rd latest |
This file contains hidden or 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
First login user #=> this will store a valid API key in current session | |
$ app.post 'api/users/login', { login: 'user login', password: "user password" } | |
status of 200 means it's been successful | |
You can now make a request to the route/action you're trying to test. | |
i.e. $ app.post 'api/accounts/manual', params #=> this tests the manual_accounts#create | |
* remember to run rake tasks | |
rake:schema:load | |
rake:db:test:prepare # test |