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 NewPostForm | |
| include Capybara::DSL # Capybara | |
| include FactoryBot::Syntax::Methods # FactoryBot | |
| include Warden::Test::Helpers # Devise | |
| include Rails.application.routes.url_helpers # Routes | |
| def login(user) | |
| login_as(user, :scope => :user) | |
| self | |
| 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
| class NewPostForm | |
| include Capybara::DSL | |
| include FactoryBot::Syntax::Methods | |
| include Warden::Test::Helpers | |
| include Rails.application.routes.url_helpers | |
| 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
| class NewPostForm | |
| 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
| mkdir spec/support | |
| touch spec/support/new_post_form.rb |
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
| it "can create posts -page object pattern" do | |
| new_post_form = NewPostForm.new | |
| new_post_form.login(user).visit_page.fill_in_with( | |
| post_title: "My super Blog title", | |
| post_input_content: "##loren loren\n ipsum ipsum" | |
| ).submit | |
| expect(page).to have_content 'Post was successfully created' | |
| 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
| it "can create posts" do | |
| login_as(user, :scope => :user) | |
| visit new_post_path | |
| within("#new_post") do | |
| fill_in 'post_title', with: "My super Blog title" | |
| fill_in 'post_input_content', with: "##loren loren\n ipsum ipsum" | |
| end | |
| click_button 'Publish' | |
| expect(page).to have_content 'Post was successfully created' |
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
| $ bundle exec rake sandbox | |
| create | |
| create README.md | |
| create Rakefile | |
| create .ruby-version | |
| create config.ru | |
| create Gemfile | |
| create app | |
| create app/assets/config/manifest.js | |
| create app/assets/javascripts/application.js |
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
| Started GET "/api/v1/variants?q%5Bproduct_name_or_sku_cont%5D=ROR&token=6b0846182053fe39a58700d23f04ec37893730c3788fdae0&_=1549395307816" for 127.0.0.1 at 2019-02-05 17:35:20 -0200 | |
| Processing by Spree::Api::V1::VariantsController#index as JSON | |
| Parameters: {"q"=>{"product_name_or_sku_cont"=>"ROR"}, "token"=>"6b0846182053fe39a58700d23f04ec37893730c3788fdae0", "_"=>"1549395307816"} | |
| Spree::User Load (0.5ms) SELECT "spree_users".* FROM "spree_users" WHERE "spree_users"."deleted_at" IS NULL AND "spree_users"."spree_api_key" = ? LIMIT ? [["spree_api_key", "6b0846182053fe39a58700d23f04ec37893730c3788fdae0"], ["LIMIT", 1]] | |
| (0.2ms) SELECT "spree_roles"."name" FROM "spree_roles" INNER JOIN "spree_role_users" ON "spree_roles"."id" = "spree_role_users"."role_id" WHERE "spree_role_users"."user_id" = ? [["user_id", 1]] | |
| Spree::Role Load (0.2ms) SELECT "spree_roles".* FROM "spree_roles" INNER JOIN "spree_role_users" ON "spree_roles"."id" = "spree_role_users"."role_id" WHERE "spree_role_users"."user_id" = ? [[" |
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
| 1> RESTORE DATABASE UsersDB_ERP_BC | |
| 2> FROM DISK = '/var/opt/mssql/backup/usersdb_erp_bc.bak' | |
| 3> WITH MOVE 'UsersDB_ERP_QL' TO '/var/opt/mssql/data/UsersDB_ERP.mdf', | |
| 4> MOVE 'UsersDB_ERP_QL_log' TO '/var/opt/mssql/data/UsersDB_ERP.ldf' | |
| 5> GO | |
| Processed 675968 pages for database 'UsersDB_ERP_BC', file 'UsersDB_ERP_QL' on file 1. | |
| Processed 6 pages for database 'UsersDB_ERP_BC', file 'UsersDB_ERP_QL_log' on file 1. | |
| Converting database 'UsersDB_ERP_BC' from version 661 to the current version 869. | |
| Database 'UsersDB_ERP_BC' running the upgrade step from version 661 to version 668. | |
| Database 'UsersDB_ERP_BC' running the upgrade step from version 668 to version 669. |
NewerOlder