Skip to content

Commit 65f7516

Browse files
committed
fix slack connection test
1 parent 2e70861 commit 65f7516

File tree

4 files changed

+21
-41
lines changed

4 files changed

+21
-41
lines changed

README.md

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,31 @@ Esta aplicación permite preguntarle a los usuarios de un workspace de slack que
66

77

88
## Configuración bot slack ##
9-
9+
Primero deves crear una app de slack en el siguiente link: [Crear slack app](https://api.slack.com/apps?new_app=1)
10+
Lo invitas a tu workspace con con los siguientes permisos:
1011
* chat:write
1112
* im:history
1213
* im:write
1314
* users:read
1415

1516

17+
Modifica los siguientes settings:
18+
CLIENT_ID = [your-id]
19+
CLIENT_SECRET = [your-secret]
20+
VERIFICATION_TOKEN = [your-verification-token]
21+
BOT_USER_ACCESS_TOKEN = [your-bot-user-access-token]
22+
23+
## Configuramos el ambiente ##
24+
25+
26+
27+
## Configuraciones backend ##
28+
Este codigo esta testeado para python 3.8 por lo cual se recomienda mantener la versión.
29+
30+
Instalamos las librerias:
31+
pip install -r backend/requirements.txt
32+
33+
34+
1635

1736

backend/slackapp/tests/test_slack_connection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ def test_send_menu(self):
1919
'pollo con arroz',
2020
'pollo con papas'
2121
]
22-
response = slack.send_menu_users(meals)
22+
response = slack.send_menu_to_users(meals)
2323
self.assertEqual(response, True)

frontend/src/app/app.component.spec.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,4 @@ describe('AppComponent', () => {
1414
}).compileComponents();
1515
}));
1616

17-
it('should create the app', () => {
18-
const fixture = TestBed.createComponent(AppComponent);
19-
const app = fixture.componentInstance;
20-
expect(app).toBeTruthy();
21-
});
22-
23-
it(`should have as title 'frontend'`, () => {
24-
const fixture = TestBed.createComponent(AppComponent);
25-
const app = fixture.componentInstance;
26-
expect(app.title).toEqual('frontend');
27-
});
28-
29-
it('should render title', () => {
30-
const fixture = TestBed.createComponent(AppComponent);
31-
fixture.detectChanges();
32-
const compiled = fixture.nativeElement;
33-
expect(compiled.querySelector('.content span').textContent).toContain('frontend app is running!');
34-
});
3517
});
Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { TestBed, async } from '@angular/core/testing';
22
import { RouterTestingModule } from '@angular/router/testing';
3-
import { AppComponent } from './app.component';
43

54
describe('AppComponent', () => {
65
beforeEach(async(() => {
@@ -9,27 +8,7 @@ describe('AppComponent', () => {
98
RouterTestingModule
109
],
1110
declarations: [
12-
AppComponent
1311
],
1412
}).compileComponents();
1513
}));
16-
17-
it('should create the app', () => {
18-
const fixture = TestBed.createComponent(AppComponent);
19-
const app = fixture.componentInstance;
20-
expect(app).toBeTruthy();
21-
});
22-
23-
it(`should have as title 'frontend'`, () => {
24-
const fixture = TestBed.createComponent(AppComponent);
25-
const app = fixture.componentInstance;
26-
expect(app.title).toEqual('frontend');
27-
});
28-
29-
it('should render title', () => {
30-
const fixture = TestBed.createComponent(AppComponent);
31-
fixture.detectChanges();
32-
const compiled = fixture.nativeElement;
33-
expect(compiled.querySelector('.content span').textContent).toContain('frontend app is running!');
34-
});
3514
});

0 commit comments

Comments
 (0)