-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Capybara/ClickLinkOrButtonStyle * Capybara/RSpec/HaveSelector * Rails/RedundantActiveRecordAllMethod * RSpec/Rails/HaveHttpStatus * RSpec/Rails/HttpStatus * RSpec/Rails/InferredSpecType * Style/RedundantConstantBase
- Loading branch information
Showing
26 changed files
with
48 additions
and
48 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
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
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
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,6 +1,6 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe PagesController, type: :routing do | ||
RSpec.describe PagesController do | ||
it { is_expected.to route(:get, '/').to(action: :index) } | ||
it { is_expected.to route(:get, '/this_month_in_ruby').to(action: :this_month_in_ruby) } | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
require 'rails_helper' | ||
|
||
RSpec.describe PastEventsController, type: :routing do | ||
RSpec.describe PastEventsController do | ||
it { is_expected.to route(:get, '/past_events').to(action: :index) } | ||
it { is_expected.to route(:get, '/past_events/2005/2').to(action: :show, year: '2005', month: '2') } | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe "PastEvent Administration", type: :system do | ||
RSpec.describe "PastEvent Administration" do | ||
let!(:admin_user) { create(:admin_user, email: '[email protected]', password: 'P4ssw0rd') } | ||
let!(:other_speaker) { create(:speaker, name: 'Chris Nelson') } | ||
|
||
|
@@ -12,7 +12,7 @@ | |
|
||
fill_in :admin_user_email, with: admin_user.email | ||
fill_in :admin_user_password, with: 'P4ssw0rd' | ||
click_on 'Log in' | ||
click_button 'Log in' | ||
|
||
visit new_admin_past_event_path | ||
expect(page).to have_text('New Past Event') | ||
|
@@ -25,7 +25,7 @@ | |
select other_speaker.name, from: 'past_event[speaker_ids][]' | ||
fill_in 'past_event[description]', with: 'No, we mean it! This is a reeeeally cool Rails feature.' | ||
|
||
click_on 'commit' | ||
click_button 'commit' | ||
|
||
new_past_event = PastEvent.last | ||
expect(new_past_event.topic).to eq('A Really Cool Rails Feature') | ||
|
@@ -41,7 +41,7 @@ | |
|
||
fill_in :admin_user_email, with: admin_user.email | ||
fill_in :admin_user_password, with: 'P4ssw0rd' | ||
click_on 'Log in' | ||
click_button 'Log in' | ||
|
||
visit edit_admin_past_event_path(past_event) | ||
expect(page).to have_text('Editing Past Event') | ||
|
@@ -51,7 +51,7 @@ | |
unselect past_event.speakers.first.name, from: 'past_event[speaker_ids][]' | ||
select other_speaker.name, from: 'past_event[speaker_ids][]' | ||
|
||
click_on 'commit' | ||
click_button 'commit' | ||
|
||
expect(past_event.reload.speakers.map(&:name).sort).to eq([other_speaker.name, past_event.speakers.last.name].sort) | ||
end | ||
|
@@ -67,7 +67,7 @@ | |
|
||
fill_in :admin_user_email, with: admin_user.email | ||
fill_in :admin_user_password, with: 'P4ssw0rd' | ||
click_on 'Log in' | ||
click_button 'Log in' | ||
|
||
visit admin_past_events_path | ||
expect(page).to have_text('Past Events') | ||
|
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,6 +1,6 @@ | ||
require "rails_helper" | ||
|
||
RSpec.describe "Speaker Administration", type: :system do | ||
RSpec.describe "Speaker Administration" do | ||
let!(:admin_user) { create(:admin_user, email: '[email protected]', password: 'P4ssw0rd') } | ||
|
||
context 'when creating' do | ||
|
@@ -10,7 +10,7 @@ | |
fill_in :admin_user_email, with: admin_user.email | ||
fill_in :admin_user_password, with: 'P4ssw0rd' | ||
|
||
click_on 'Log in' | ||
click_button 'Log in' | ||
|
||
visit new_admin_speaker_path | ||
expect(page).to have_text('New Speaker') | ||
|
@@ -22,7 +22,7 @@ | |
fill_in 'speaker[email]', with: '[email protected]' | ||
fill_in 'speaker[image_url]', with: 'https://example.com/jimweirich/images/avatar.png' | ||
|
||
click_on 'commit' | ||
click_button 'commit' | ||
|
||
new_speaker = Speaker.last | ||
expect(new_speaker.name).to eq('Jim Weirich') | ||
|
@@ -40,7 +40,7 @@ | |
|
||
fill_in :admin_user_email, with: admin_user.email | ||
fill_in :admin_user_password, with: 'P4ssw0rd' | ||
click_on 'Log in' | ||
click_button 'Log in' | ||
|
||
visit edit_admin_speaker_path(speaker) | ||
expect(page).to have_text('Editing Speaker') | ||
|
@@ -52,7 +52,7 @@ | |
fill_in 'speaker[email]', with: "new.#{speaker.email}" | ||
fill_in 'speaker[image_url]', with: Faker::Internet.url(host: 'example.com', path: '/avatar/new.jpeg') | ||
|
||
click_on 'commit' | ||
click_button 'commit' | ||
|
||
old_data = speaker.attributes | ||
speaker.reload | ||
|
@@ -73,7 +73,7 @@ | |
|
||
fill_in :admin_user_email, with: admin_user.email | ||
fill_in :admin_user_password, with: 'P4ssw0rd' | ||
click_on 'Log in' | ||
click_button 'Log in' | ||
|
||
visit admin_speakers_path | ||
expect(page).to have_text('Speakers') | ||
|
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,7 +1,7 @@ | ||
require "rails_helper" | ||
require 'securerandom' | ||
|
||
RSpec.describe "Video Administration", type: :system do | ||
RSpec.describe "Video Administration" do | ||
let!(:admin_user) { create(:admin_user, email: '[email protected]', password: 'P4ssw0rd') } | ||
let!(:past_event) { create(:past_event) } | ||
let(:url) { Faker::Internet.url(host: 'example.com', path: "/videos/#{SecureRandom.alphanumeric(8)}") } | ||
|
@@ -12,7 +12,7 @@ | |
|
||
fill_in :admin_user_email, with: admin_user.email | ||
fill_in :admin_user_password, with: 'P4ssw0rd' | ||
click_on 'Log in' | ||
click_button 'Log in' | ||
|
||
visit new_admin_video_path | ||
expect(page).to have_text('New Video') | ||
|
@@ -22,7 +22,7 @@ | |
fill_in 'video[url]', with: url | ||
select past_event.topic, from: 'video[past_event_id]' | ||
|
||
click_on 'commit' | ||
click_button 'commit' | ||
|
||
new_video = Video.last | ||
expect(new_video.url).to eq(url) | ||
|
@@ -39,7 +39,7 @@ | |
|
||
fill_in :admin_user_email, with: admin_user.email | ||
fill_in :admin_user_password, with: 'P4ssw0rd' | ||
click_on 'Log in' | ||
click_button 'Log in' | ||
|
||
visit edit_admin_video_path(video) | ||
expect(page).to have_text('Editing Video') | ||
|
@@ -49,7 +49,7 @@ | |
fill_in 'video[url]', with: "#{video.url}v2" | ||
select other_event.topic, from: 'video[past_event_id]' | ||
|
||
click_on 'commit' | ||
click_button 'commit' | ||
|
||
old_data = video.attributes | ||
video.reload | ||
|
@@ -68,7 +68,7 @@ | |
|
||
fill_in :admin_user_email, with: admin_user.email | ||
fill_in :admin_user_password, with: 'P4ssw0rd' | ||
click_on 'Log in' | ||
click_button 'Log in' | ||
|
||
visit admin_videos_path | ||
expect(page).to have_text('Videos') | ||
|
Oops, something went wrong.