Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ group :test do
gem "rails-controller-testing"

# gem SImplecov para testes de cobertura
gem 'simplecov', require: false
gem "simplecov", require: false
end

gem "activerecord-import"
6 changes: 3 additions & 3 deletions spec/requests/formularios_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

it "retorna sucesso HTTP 200 e exibe a turma na página" do
get formularios_path

expect(response).to have_http_status(:success)
expect(response.body).to include("CIC0097")
expect(response.body).to include("BANCOS DE DADOS")
Expand All @@ -44,9 +44,9 @@
context "Cenário Triste: quando o discente NÃO tem matrículas" do
it "exibe a mensagem de ausência de formulários pendentes" do
get formularios_path

expect(response.body).to include("Você não possui formulários pendentes para este semestre")
end
end
end
end
end
19 changes: 19 additions & 0 deletions spec/system/login_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,4 +70,23 @@

expect(page).to have_content("Usuário e/ou senha inválidos")
end
it "permite logout do usuário autenticado" do
User.create!(
nome: "Discente Logout",
email: "discente_logout@camaar.com",
matricula: "202400004",
perfil: "Discente",
password: "123456"
)

visit login_path

fill_in "E-mail ou matrícula", with: "discente_logout@camaar.com"
fill_in "Senha", with: "123456"
click_button "Entrar"

page.driver.submit :delete, logout_path, {}

expect(page).to have_current_path(login_path)
end
end
Loading