mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-18 22:21:11 +00:00
Fix the test failures
This commit is contained in:
parent
50e876dd6f
commit
e85ecede4c
29 changed files with 232 additions and 232 deletions
|
|
@ -19,7 +19,7 @@ feature 'BaseController' do
|
|||
end
|
||||
end
|
||||
|
||||
context 'when user is ' do
|
||||
context 'when user is' do
|
||||
before(:each) do
|
||||
sign_in(user)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ feature Conference do
|
|||
expect(Conference.count).to eq(expected_count)
|
||||
expect(Conference.last.organization).to eq(organization)
|
||||
user.reload
|
||||
expect(user.has_cached_role? :organizer, Conference.last).to eq(true)
|
||||
expect(user.has_cached_role? :organizer, Conference.last).to be(true)
|
||||
end
|
||||
|
||||
scenario 'update conference', feature: true, js: true do
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ feature Openid do
|
|||
expect(flash).to eq('test-participant-1@example.com signed in successfully with google')
|
||||
expect(Openid.count).to eq(expected_count_openid)
|
||||
expect(User.count).to eq(expected_count_user)
|
||||
expect(Openid.where(email: 'test-1@example.com').first.nil?).to eq(false)
|
||||
expect(Openid.where(email: 'test-1@example.com').first.nil?).to be(false)
|
||||
end
|
||||
|
||||
scenario 'signs in with openID using the same email as another associated openid' do
|
||||
|
|
@ -105,8 +105,8 @@ feature Openid do
|
|||
page.find('#flash .close').click
|
||||
expect(Openid.count).to eq(expected_count_openid)
|
||||
expect(User.count).to eq(expected_count_user)
|
||||
expect(Openid.where(email: 'test-participant-1@example.com').first.nil?).to eq(false)
|
||||
expect(Openid.where(email: 'test-1@example.com').first.nil?).to eq(false)
|
||||
expect(Openid.where(email: 'test-participant-1@example.com').first.nil?).to be(false)
|
||||
expect(Openid.where(email: 'test-1@example.com').first.nil?).to be(false)
|
||||
|
||||
# Sign in with different openID using same email (test-1@gmail.com)
|
||||
sign_out
|
||||
|
|
@ -131,8 +131,8 @@ feature Openid do
|
|||
shared_examples 'sign up with openid' do |provider|
|
||||
scenario "has option to sign in with #{provider}" do
|
||||
visit '/accounts/sign_up'
|
||||
expect(page.has_content?('or sign in using')).to eq true
|
||||
expect(page.has_link?("omniauth-#{provider}")).to eq true
|
||||
expect(page.has_content?('or sign in using')).to be true
|
||||
expect(page.has_link?("omniauth-#{provider}")).to be true
|
||||
end
|
||||
|
||||
scenario "sign up with #{provider}" do
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ feature Role do
|
|||
visit admin_conference_roles_path(conference.short_title)
|
||||
end
|
||||
scenario "role #{role_name}" do
|
||||
expect(page.has_link?('Edit', href: edit_admin_conference_role_path(conference.short_title, role_name))).to eq false
|
||||
expect(page.has_link?('Edit', href: edit_admin_conference_role_path(conference.short_title, role_name))).to be false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ feature Role do
|
|||
click_button 'Add'
|
||||
user_with_no_role.reload
|
||||
|
||||
expect(user_with_no_role.has_cached_role?(role.name, conference)).to eq true
|
||||
expect(user_with_no_role.has_cached_role?(role.name, conference)).to be true
|
||||
end
|
||||
|
||||
scenario "removes role #{role_name}", feature: true, js: true do
|
||||
|
|
@ -72,7 +72,7 @@ feature Role do
|
|||
expect(page).to have_css('.alert', text: "Successfully removed role #{role_name} from user #{user_with_role.email}")
|
||||
expect(by_role_name).to eq(role_name) | eq('organizer')
|
||||
user_with_role.reload
|
||||
expect(user_with_role.has_cached_role?(role_name, conference)).to eq false
|
||||
expect(user_with_role.has_cached_role?(role_name, conference)).to be false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -91,13 +91,13 @@ feature Role do
|
|||
scenario "add role #{role_name}", feature: true, js: true do
|
||||
click_link('Users', href: admin_conference_role_path(conference.short_title, role_name))
|
||||
|
||||
expect(page.has_field?('user_email')).to eq false
|
||||
expect(page.has_field?('user_email')).to be false
|
||||
end
|
||||
|
||||
scenario "remove role #{role_name}", feature: true, js: true do
|
||||
click_link('Users', href: admin_conference_role_path(conference.short_title, role_name))
|
||||
|
||||
expect(first('td').has_css?('.bootstrap-switch-container')).to eq false
|
||||
expect(first('td').has_css?('.bootstrap-switch-container')).to be false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -121,7 +121,7 @@ feature Role do
|
|||
click_button 'Add'
|
||||
user_with_no_role.reload
|
||||
|
||||
expect(user_with_no_role.has_cached_role?('organization_admin', organization)).to eq true
|
||||
expect(user_with_no_role.has_cached_role?('organization_admin', organization)).to be true
|
||||
end
|
||||
|
||||
scenario 'successfully removes role organization_admin' do
|
||||
|
|
@ -129,7 +129,7 @@ feature Role do
|
|||
|
||||
first('tr').find('.btn-danger').click
|
||||
organization_admin.reload
|
||||
expect(organization_admin.has_cached_role?('organization_admin', organization)).to eq false
|
||||
expect(organization_admin.has_cached_role?('organization_admin', organization)).to be false
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -137,12 +137,12 @@ feature Role do
|
|||
scenario 'does not successfully add role organization_admin' do
|
||||
click_link('Admins', href: admins_admin_organization_path(other_organization.id))
|
||||
|
||||
expect(page.has_field?('user_email')).to eq false
|
||||
expect(page.has_field?('user_email')).to be false
|
||||
end
|
||||
|
||||
scenario 'does not successfully removes role organization_admin' do
|
||||
click_link('Admins', href: admins_admin_organization_path(other_organization.id))
|
||||
expect(page.has_css?('.btn-danger')).to eq false
|
||||
expect(page.has_css?('.btn-danger')).to be false
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -90,8 +90,8 @@ feature Track do
|
|||
expected.to change { Track.count }.by 1
|
||||
expect(flash).to eq('Track request successfully created.')
|
||||
within('table#tracks') do
|
||||
expect(page.has_content?('Distribution')).to eq true
|
||||
expect(page.has_content?('Events about our Linux dist...')).to eq true
|
||||
expect(page.has_content?('Distribution')).to be true
|
||||
expect(page.has_content?('Events about our Linux dist...')).to be true
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -111,8 +111,8 @@ feature Track do
|
|||
expected.to_not(change { Track.count })
|
||||
expect(flash).to eq("Track #{track.name} withdrawn.")
|
||||
within('table#tracks') do
|
||||
expect(page.has_content?(track.name)).to eq true
|
||||
expect(page.has_link?('Re-Submit')).to eq true
|
||||
expect(page.has_content?(track.name)).to be true
|
||||
expect(page.has_link?('Re-Submit')).to be true
|
||||
end
|
||||
end
|
||||
|
||||
|
|
@ -134,8 +134,8 @@ feature Track do
|
|||
expected.to_not(change { Track.count })
|
||||
expect(flash).to eq('Track request successfully updated.')
|
||||
within('table#tracks') do
|
||||
expect(page.has_content?('Distribution')).to eq true
|
||||
expect(page.has_content?('Events about our Linux dist...')).to eq true
|
||||
expect(page.has_content?('Distribution')).to be true
|
||||
expect(page.has_content?('Events about our Linux dist...')).to be true
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue