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
| en: | |
| app: | |
| name: 'vocortex' | |
| admin: | |
| agencies: | |
| add_credit_form: | |
| title: 'Add Credits to Agency' | |
| index: | |
| title: 'Agencies' |
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
| en: | |
| app: | |
| name: 'vocortex' | |
| admin: | |
| agencies: | |
| add_credit_form: | |
| title: 'Add Credits to Agency' | |
| index: | |
| title: 'Agencies' |
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
| require 'spec_helper' | |
| feature 'User can view book' do | |
| scenario 'Providing valid params' do | |
| sign_in | |
| click_on_dashboard | |
| search_for_book | |
| click_on_book_thumbnail | |
| #... rest of the test goes here |
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
| FactoryGirl.define do | |
| factory :agency do | |
| #... other fields | |
| profile_image { File.open(Rails.root.join('spec', 'support', 'files', 'image-600.jpeg')) } | |
| banner_image { File.open(Rails.root.join('spec', 'support', 'files', 'image.jpeg')) } | |
| end | |
| FactoryGirl.define do | |
| factory :agency do |
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
| heaps_of_users_wishlists = UsersWishlist.where(user: user) | |
| heaps_of_groups = BookIdentifierGroup.where(id: heaps_of_users_wishlists.pluck(:book_identifier_group_id) | |
| the_book_identifiers_I_wanna = BookIdentifier.where(group_id: heaps_of_groups.pluck(:id)) | |
| puts the_book_identifiers_I_wanna | |
| # This shit triggers 3 queries | |
| heaps_of_users_wishlists = UsersWishlist.where(user: user) | |
| heaps_of_groups = BookIdentifierGroup.joins(:users_wishlists).merge(heaps_of_users_wishlists) |
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 Tongln.AjaxRequester | |
| constructor: (options) -> | |
| @options = options | |
| send: -> | |
| $.ajax(@options) | |
| .done (data, textStatus, jqXHR) => | |
| Tongln.DebugHelpers.logSuccessAjax(data, textStatus, jqXHR) | |
| .error (jqXHR, textStatus, errorThrown) => | |
| Tongln.DebugHelpers.logFailAjax(jqXHR, textStatus, errorThrown) |
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
| RSpec.configure do |config| | |
| config.before(:suite) do | |
| Warden.test_mode! | |
| end | |
| config.after(:each) do |example| | |
| Warden.test_reset! | |
| 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
| ENV["RAILS_ENV"] ||= 'test' | |
| require 'simplecov' | |
| require 'simplecov-rcov' | |
| SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter | |
| SimpleCov.start 'rails' | |
| require File.expand_path("../../config/environment", __FILE__) | |
| require 'rspec/rails' | |
| require 'pundit/rspec' |
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
| # This file is copied to spec/ when you run 'rails generate rspec:install' | |
| ENV["RAILS_ENV"] ||= 'test' | |
| require 'spec_helper' | |
| require File.expand_path("../../config/environment", __FILE__) | |
| require 'rspec/rails' | |
| require 'spree/testing_support/factories' | |
| require 'spree_product_contributors/factories' | |
| require 'capybara/poltergeist' | |
| require 'simplecov' | |
| require 'email_spec' |
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
| Instance method "open" is already defined in Object, use generic helper instead or set StateMachine::Machine.ignore_method_conflicts = true. | |
| Admins can edit a contributor's links | |
| {"relname"=>"spree_stock_locations", "rowcount"=>"1"} | |
| {"relname"=>"spree_prices", "rowcount"=>"3"} | |
| {"relname"=>"spree_option_types", "rowcount"=>"2"} | |
| {"relname"=>"spree_shipping_categories", "rowcount"=>"1"} | |
| {"relname"=>"spree_coverings", "rowcount"=>"2"} | |
| {"relname"=>"spree_products", "rowcount"=>"1"} | |
| {"relname"=>"spree_variant_statuses", "rowcount"=>"2"} |