Normalize instance in login tests

environments/review-oauth-cons-1jbqhx/deployments/761
Alex Gleason 2022-08-11 22:31:53 -05:00
rodzic 386af1ea2c
commit bc72739dda
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
2 zmienionych plików z 7 dodań i 5 usunięć

Wyświetl plik

@ -1,6 +1,7 @@
import { Map as ImmutableMap } from 'immutable';
import React from 'react';
import { normalizeInstance } from 'soapbox/normalizers';
import { fireEvent, render, screen } from '../../../../jest/test-helpers';
import LoginForm from '../login_form';
@ -8,7 +9,7 @@ describe('<LoginForm />', () => {
it('renders for Pleroma', () => {
const mockFn = jest.fn();
const store = {
instance: ImmutableMap({
instance: normalizeInstance({
version: '2.7.2 (compatible; Pleroma 2.3.0)',
}),
};
@ -21,7 +22,7 @@ describe('<LoginForm />', () => {
it('renders for Mastodon', () => {
const mockFn = jest.fn();
const store = {
instance: ImmutableMap({
instance: normalizeInstance({
version: '3.0.0',
}),
};

Wyświetl plik

@ -1,13 +1,14 @@
import { Map as ImmutableMap } from 'immutable';
import React from 'react';
import { normalizeInstance } from 'soapbox/normalizers';
import { render, screen } from '../../../../jest/test-helpers';
import LoginPage from '../login_page';
describe('<LoginPage />', () => {
it('renders correctly on load', () => {
const store = {
instance: ImmutableMap({
instance: normalizeInstance({
version: '2.7.2 (compatible; Pleroma 2.3.0)',
}),
};