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
| Using the default profile... | |
| Disabling profiles... | |
| Feature: User management | |
| Scenario: Logging in with a new account[90m # features/users.feature:3[0m | |
| [32mWhen I log in[90m # features/step_definitions/user_steps.rb:9[0m[0m | |
| [32mThen I should get redirected to [32m[1mthe settings page[0m[0m[32m[90m # features/step_definitions/user_steps.rb:18[0m[0m | |
| [32mAnd I should get a [32m[1msuccess[0m[0m[32m flash[90m # features/step_definitions/user_steps.rb:28[0m[0m | |
| Scenario: Logging in with an existing account[90m # features/users.feature:8[0m |
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
| Feature: User management | |
| Scenario: Logging in with a new account | |
| When I log in | |
| Then I should get redirected to the settings page | |
| And I should get a success flash | |
| Scenario: Logging in with an existing account | |
| Given a User exists with an identity url of "http://foo.com/" | |
| When I log in as http://foo.com/ |
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
| describe DupesController do | |
| describe "GET /new" do | |
| it "should redirect to root_path if user is not logged in" do | |
| get :new | |
| request.should redirect_to root_url | |
| end | |
| it "should display the form if user is logged in" do | |
| session[:user_id] = FactoryGirl.create(:user).id | |
| get :new | |
| request.should render_template 'dupes/new' |
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
| describe DupesController, js: true do | |
| def login | |
| visit "/auth/steam" | |
| end | |
| context "#new" do | |
| it "should show a preview" do | |
| login | |
| visit new_dupe_path | |
| within "#new_dupe" do | |
| fill_in 'dupe_description', with: <<-TEXT |
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
| !!! | |
| %html | |
| %head | |
| %title Dupeshare | |
| = stylesheet_link_tag "application" | |
| = javascript_include_tag "application" | |
| = csrf_meta_tags | |
| %body | |
| = render partial: 'shared/nav' | |
| .container |
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
| doctype | |
| html | |
| head | |
| title Dupeshare | |
| = stylesheet_link_tag "application" | |
| = javascript_include_tag "application" | |
| = csrf_meta_tags | |
| body | |
| = render partial: 'shared/nav' | |
| .container |
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
| fs = require 'fs' | |
| page = require('webpage').create() | |
| HS = '"""' | |
| url = phantom.args[0] | |
| page.open url, (status) -> | |
| try | |
| result = page.evaluate -> |
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
| window.TPL ||= {} | |
| TPL.screenshot_form = (id) -> | |
| """ | |
| <div class="screenshot" data-id="#{id}"> | |
| <div class="control-group string required"><label class="string required" for="dupe_screenshots_attributes_#{id}_file"><abbr title="required">*</abbr> Image</label><div class="controls"><input class="string required" id="dupe_screenshots_attributes_#{id}_file" name="dupe[screenshots_attributes][#{id}][file]" size="50" type="text"></div></div> | |
| <input id="dupe_screenshots_attributes_#{id}_file_cache" name="dupe[screenshots_attributes][#{id}][file_cache]" type="hidden"> | |
| <div class="control-group string required"><label class="string required" for="dupe_screenshots_attributes_#{id}_description"><abbr title="required">*</abbr> Description</label><div class="controls"><input class="string required" id="dupe_screenshots_attributes_#{id}_description" name="dupe[screenshots_attributes][#{id}][description]" size="50" type="text"><p class="help-block"><span class="delete"> | |
| <a class="delete" href |
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
| link = null | |
| window.loginCallback = -> | |
| document.location.href = link if link | |
| $ -> | |
| $('a[data-login]').click (evt) -> | |
| link = this.href | |
| wnd = window.open '/auth/steam', 'login', 'menubar=no,status=no' | |
| if window.opener and window.opener.loginCallback | |
| window.opener.loginCallback() | |
| window.close() |
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
| describe DupesController, js: true do | |
| def login | |
| visit "/auth/steam" | |
| end | |
| context "#new" do | |
| it "should show a preview" do | |
| login | |
| visit new_dupe_path | |
| within "#new_dupe" do | |
| fill_in 'dupe_description', with: <<-TEXT |